Created
January 22, 2026 22:20
-
-
Save maujim/cbbc8fae1d6fc74ffea82839168dd819 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env -S uv run --script --with git+https://github.com/ml-explore/mlx-lm@1b76e3d580f35bb5a211d0be1ae414854869fded | |
| # Thu 22 Jan 2026 17:19:31 EST | |
| from mlx_lm import load, generate | |
| model, tokenizer = load("huihui-ai/Huihui-GLM-4.7-Flash-abliterated-mlx-4bit") | |
| prompt = "Write a story about Einstein" | |
| messages = [{"role": "user", "content": prompt}] | |
| prompt = tokenizer.apply_chat_template( | |
| messages, add_generation_prompt=True | |
| ) | |
| text = generate(model, tokenizer, prompt=prompt, verbose=True) | |
| print(text) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment