CoolFace
Modelpublic

andito/mlx_summarization

sourceHugging Faceupdated 2y agoView on Hugging Face
1likes28downloads
README.md33 linesDownload Raw Back to root
1---2library_name: transformers3tags:4- mlx5base_model: HuggingFaceTB/SmolLM2-1.7B-Intermediate-SFT-v2-summarization-lora-r32-a64-merged-26---7 8# andito/mlx_summarization9 10The Model [andito/mlx_summarization](https://huggingface.co/andito/mlx_summarization) was converted to MLX format from [HuggingFaceTB/SmolLM2-1.7B-Intermediate-SFT-v2-summarization-lora-r32-a64-merged-2](https://huggingface.co/HuggingFaceTB/SmolLM2-1.7B-Intermediate-SFT-v2-summarization-lora-r32-a64-merged-2) using mlx-lm version **0.19.2**.11 12## Use with mlx13 14```bash15pip install mlx-lm16```17 18```python19from mlx_lm import load, generate20 21model, tokenizer = load("andito/mlx_summarization")22 23prompt="hello"24 25if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None:26    messages = [{"role": "user", "content": prompt}]27    prompt = tokenizer.apply_chat_template(28        messages, tokenize=False, add_generation_prompt=True29    )30 31response = generate(model, tokenizer, prompt=prompt, verbose=True)32```33