--- library_name: mlx license: other license_link: https://huggingface.co/tencent/Youtu-LLM-2B/LICENSE.txt pipeline_tag: text-generation base_model: tencent/Youtu-LLM-2B tags: - mlx --- # mlx-community/Youtu-LLM-2B-mlx-4bit This model [mlx-community/Youtu-LLM-2B-mlx-4bit](https://huggingface.co/mlx-community/Youtu-LLM-2B-mlx-4bit) was converted to MLX format from [tencent/Youtu-LLM-2B](https://huggingface.co/tencent/Youtu-LLM-2B) using mlx-lm version **0.30.0**. ## Use with mlx ```bash pip install mlx-lm ``` ```python from mlx_lm import load, generate model, tokenizer = load("mlx-community/Youtu-LLM-2B-mlx-4bit") prompt = "hello" if tokenizer.chat_template is not None: messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True, return_dict=False, ) response = generate(model, tokenizer, prompt=prompt, verbose=True) ```