| license: apache-2.0 | |
| language: | |
| - zh | |
| - en | |
| base_model: Kwai-Klear/Klear-46B-A2.5B-Instruct | |
| pipeline_tag: text-generation | |
| library_name: mlx | |
| tags: | |
| - mlx | |
| # mlx-community/Klear-46B-A2.5B-Instruct-3bit | |
| This model [mlx-community/Klear-46B-A2.5B-Instruct-3bit](https://huggingface.co/mlx-community/Klear-46B-A2.5B-Instruct-3bit) was | |
| converted to MLX format from [Kwai-Klear/Klear-46B-A2.5B-Instruct](https://huggingface.co/Kwai-Klear/Klear-46B-A2.5B-Instruct) | |
| using mlx-lm version **0.27.1**. | |
| ## Use with mlx | |
| ```bash | |
| pip install mlx-lm | |
| ``` | |
| ```python | |
| from mlx_lm import load, generate | |
| model, tokenizer = load("mlx-community/Klear-46B-A2.5B-Instruct-3bit") | |
| prompt = "hello" | |
| if tokenizer.chat_template is not None: | |
| messages = [{"role": "user", "content": prompt}] | |
| prompt = tokenizer.apply_chat_template( | |
| messages, add_generation_prompt=True | |
| ) | |
| response = generate(model, tokenizer, prompt=prompt, verbose=True) | |
| ``` | |