Instructions to use mlx-community/OpenMath-Nemotron-32B-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/OpenMath-Nemotron-32B-4bit with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("mlx-community/OpenMath-Nemotron-32B-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) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- MLX LM
How to use mlx-community/OpenMath-Nemotron-32B-4bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "mlx-community/OpenMath-Nemotron-32B-4bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "mlx-community/OpenMath-Nemotron-32B-4bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mlx-community/OpenMath-Nemotron-32B-4bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Atomic Chat
Download added_tokens.json from mlx-community/OpenMath-Nemotron-32B-4bit: direct link, hf CLI and curl.
- Browser
- Download file 605 Bytes
-
https://huggingface.co/mlx-community/OpenMath-Nemotron-32B-4bit/resolve/main/added_tokens.json
- Command line
-
hf download hf://mlx-community/OpenMath-Nemotron-32B-4bit/added_tokens.json
-
curl -L -o added_tokens.json https://huggingface.co/mlx-community/OpenMath-Nemotron-32B-4bit/resolve/main/added_tokens.json
605 Bytes
| { | |
| "</tool_call>": 151658, | |
| "<tool_call>": 151657, | |
| "<|box_end|>": 151649, | |
| "<|box_start|>": 151648, | |
| "<|endoftext|>": 151643, | |
| "<|file_sep|>": 151664, | |
| "<|fim_middle|>": 151660, | |
| "<|fim_pad|>": 151662, | |
| "<|fim_prefix|>": 151659, | |
| "<|fim_suffix|>": 151661, | |
| "<|im_end|>": 151645, | |
| "<|im_start|>": 151644, | |
| "<|image_pad|>": 151655, | |
| "<|object_ref_end|>": 151647, | |
| "<|object_ref_start|>": 151646, | |
| "<|quad_end|>": 151651, | |
| "<|quad_start|>": 151650, | |
| "<|repo_name|>": 151663, | |
| "<|video_pad|>": 151656, | |
| "<|vision_end|>": 151653, | |
| "<|vision_pad|>": 151654, | |
| "<|vision_start|>": 151652 | |
| } | |