Run this model with HF Jobs
Run shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Instructions to use shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8") model = AutoModelForCausalLM.from_pretrained("shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - MLX
How to use shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8 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("shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8") 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
- vLLM
How to use shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8
- SGLang
How to use shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Pi
How to use shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8080/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8", "messages": [ {"role": "user", "content": "Hello"} ] }' - Docker Model Runner
How to use shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8 with Docker Model Runner:
docker model run hf.co/shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8
- Hermes Agent
How to use shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8 with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8 with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Upload folder using huggingface_hub (#1)
Browse files- eb4b00a322ce33a44e432533585aa17fb190f7273b2aa19c750e0d75b5937309 (2a22b23c70d14539f020cdf525425d963202e1f5)
- f73cbe2b2c246170096de1e1f471936ddcd46bbe190d425ba04e5f7003d37be5 (388d7d2a0e88d0f078c6e4c6cb850e376132012d)
- 38a4be0d500ddd56d2d0629eb3d239a42d81185427c41133e09ecc011703f39f (a44f8cf4282cdd2138b4b647c4d8d667acc33fd7)
- cbe36d2d8a14e68ba2e50f9769b57de0161b7aca1f9a554cb5344885fa6ad47d (bb4f6f59e5e9c43e110b66afd24b43fbabebb9a9)
- 8368a9ac622a90b9b75ddacd6b51f827aed84ca2658be56464034d5fcb259b6b (b6c392754521d4afb1abdf7da54529b437738683)
- 3d64a2c995baaf736dc1e6557c750bd48fe6a33e326b5deb4cac8ba1895c1abe (13e27ef4ba0c769e6fd67b83adbeea49bd2820ac)
- 40a7ec5595fd9ac5d78591e351e8a77b9d36b15101ff79cc2bb8fa593b64c772 (97fbd2f73d85f1dbf7c913f610e4e7016e0eb9f0)
- 951313fac358917fa8406545265e3944e0cb70888716ed7fd74a5220fd2c76aa (96bdaebefe2958e71d900d38887042c91ed161a6)
Files changed (17)
- .gitattributes+1
- README.mdAdded+42
- added_tokens.jsonAdded+24
- config.jsonAdded+35
- merges.txtAdded
- model-00001-of-00007.safetensorsAdded+3
- model-00002-of-00007.safetensorsAdded+3
- model-00003-of-00007.safetensorsAdded+3
- model-00004-of-00007.safetensorsAdded+3
- model-00005-of-00007.safetensorsAdded+3
- model-00006-of-00007.safetensorsAdded+3
- model-00007-of-00007.safetensorsAdded+3
- model.safetensors.index.jsonAdded
- special_tokens_map.jsonAdded+31
- tokenizer.jsonAdded+3
- tokenizer_config.jsonAdded+207
- vocab.jsonAdded
32 unmodified lines33343532 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -text32 unmodified lines3334353632 unmodified lines*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -text
123456789101112131415161718192021222324252627282930313233343536373839404142---license: apache-2.0license_link: https://huggingface.co/Qwen/Qwen2.5-Coder-32B-Instruct/blob/main/LICENSElanguage:- enbase_model: Qwen/Qwen2.5-Coder-32B-Instructpipeline_tag: text-generationlibrary_name: transformerstags:- code- codeqwen- chat- qwen- qwen-coder- mlx---
# shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8
The Model [shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8](https://huggingface.co/shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8) was converted to MLX format from [Qwen/Qwen2.5-Coder-32B-Instruct](https://huggingface.co/Qwen/Qwen2.5-Coder-32B-Instruct) using mlx-lm version **0.19.2**.
## Use with mlx
```bashpip install mlx-lm```
```pythonfrom mlx_lm import load, generate
model, tokenizer = load("shanginn/Qwen2.5-Coder-32B-Instruct-mlx-q8")
prompt="hello"
if hasattr(tokenizer, "apply_chat_template") and tokenizer.chat_template is not None: messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True )
response = generate(model, tokenizer, prompt=prompt, verbose=True)```123456789101112131415161718192021222324{ "</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}1234567891011121314151617181920212223242526272829303132333435{ "architectures": [ "Qwen2ForCausalLM" ], "attention_dropout": 0.0, "bos_token_id": 151643, "eos_token_id": 151645, "hidden_act": "silu", "hidden_size": 5120, "initializer_range": 0.02, "intermediate_size": 27648, "max_position_embeddings": 32768, "max_window_layers": 70, "model_type": "qwen2", "num_attention_heads": 40, "num_hidden_layers": 64, "num_key_value_heads": 8, "quantization": { "group_size": 64, "bits": 8 }, "quantization_config": { "group_size": 64, "bits": 8 }, "rms_norm_eps": 1e-06, "rope_theta": 1000000.0, "sliding_window": 131072, "tie_word_embeddings": false, "torch_dtype": "bfloat16", "transformers_version": "4.43.1", "use_cache": true, "use_sliding_window": false, "vocab_size": 152064}123version https://git-lfs.github.com/spec/v1oid sha256:1930dff6344fc9c53c2bb20d46faafb12b3646d0b8f545228d0594711e2b1622size 5339700785123version https://git-lfs.github.com/spec/v1oid sha256:eb4246391a0ac5197e2cf286abae27e237e4db8f7f6f40cf9f91a40fa616ab78size 5364861187123version https://git-lfs.github.com/spec/v1oid sha256:5f800a6dd2f0f619071b2d5e551fdad74ca15848fd5b0aad0c117ab805d4da5bsize 5364830173123version https://git-lfs.github.com/spec/v1oid sha256:9dbd50ed5ae4dd37f04ad338d56c5c8268147bafe186456b12cab5d86e20e4fesize 5331404024123version https://git-lfs.github.com/spec/v1oid sha256:d9473558505d63da55bf970fef804f98ac68a7096b99b0b0bbea77460f9b0c79size 5364861246123version https://git-lfs.github.com/spec/v1oid sha256:b0fee12ade7d44a1bdb666f8275a8d7ae33c5d27f67d3125a56d46751ad2138asize 5364830197123version https://git-lfs.github.com/spec/v1oid sha256:42cc6271c6edbb711c6d4fbf7ef6908d32773b5ccda22a741f1870def54e9285size 268236991112345678910111213141516171819202122232425262728293031{ "additional_special_tokens": [ "<|im_start|>", "<|im_end|>", "<|object_ref_start|>", "<|object_ref_end|>", "<|box_start|>", "<|box_end|>", "<|quad_start|>", "<|quad_end|>", "<|vision_start|>", "<|vision_end|>", "<|vision_pad|>", "<|image_pad|>", "<|video_pad|>" ], "eos_token": { "content": "<|im_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "pad_token": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}123version https://git-lfs.github.com/spec/v1oid sha256:9c5ae00e602b8860cbd784ba82a8aa14e8feecec692e7076590d014d7b7fdafasize 11421896123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207{ "add_bos_token": false, "add_prefix_space": false, "added_tokens_decoder": { "151643": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151644": { "content": "<|im_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151645": { "content": "<|im_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151646": { "content": "<|object_ref_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151647": { "content": "<|object_ref_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151648": { "content": "<|box_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151649": { "content": "<|box_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151650": { "content": "<|quad_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151651": { "content": "<|quad_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151652": { "content": "<|vision_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151653": { "content": "<|vision_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151654": { "content": "<|vision_pad|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151655": { "content": "<|image_pad|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151656": { "content": "<|video_pad|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151657": { "content": "<tool_call>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151658": { "content": "</tool_call>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151659": { "content": "<|fim_prefix|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151660": { "content": "<|fim_middle|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151661": { "content": "<|fim_suffix|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151662": { "content": "<|fim_pad|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151663": { "content": "<|repo_name|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151664": { "content": "<|file_sep|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false } }, "additional_special_tokens": [ "<|im_start|>", "<|im_end|>", "<|object_ref_start|>", "<|object_ref_end|>", "<|box_start|>", "<|box_end|>", "<|quad_start|>", "<|quad_end|>", "<|vision_start|>", "<|vision_end|>", "<|vision_pad|>", "<|image_pad|>", "<|video_pad|>" ], "bos_token": null, "chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- else %}\n {{- '<|im_start|>system\\nYou are Qwen, created by Alibaba Cloud. You are a helpful assistant.<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) or (message.role == \"assistant\" and not message.tool_calls) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {{- '<|im_start|>' + message.role }}\n {%- if message.content %}\n {{- '\\n' + message.content }}\n {%- endif %}\n {%- for tool_call in message.tool_calls %}\n {%- if tool_call.function is defined %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '\\n<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {{- tool_call.arguments | tojson }}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n{%- endif %}\n", "clean_up_tokenization_spaces": false, "eos_token": "<|im_end|>", "errors": "replace", "model_max_length": 131072, "pad_token": "<|endoftext|>", "split_special_tokens": false, "tokenizer_class": "Qwen2Tokenizer", "unk_token": null}