Instructions to use MCES10-Software/cpp-qwen3-4B-Instruct-2507 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use MCES10-Software/cpp-qwen3-4B-Instruct-2507 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("MCES10-Software/cpp-qwen3-4B-Instruct-2507") 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) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- LM Studio
- Pi new
How to use MCES10-Software/cpp-qwen3-4B-Instruct-2507 with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "MCES10-Software/cpp-qwen3-4B-Instruct-2507"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "MCES10-Software/cpp-qwen3-4B-Instruct-2507" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use MCES10-Software/cpp-qwen3-4B-Instruct-2507 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 "MCES10-Software/cpp-qwen3-4B-Instruct-2507"
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 MCES10-Software/cpp-qwen3-4B-Instruct-2507
Run Hermes
hermes
- MLX LM
How to use MCES10-Software/cpp-qwen3-4B-Instruct-2507 with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "MCES10-Software/cpp-qwen3-4B-Instruct-2507"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "MCES10-Software/cpp-qwen3-4B-Instruct-2507" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "MCES10-Software/cpp-qwen3-4B-Instruct-2507", "messages": [ {"role": "user", "content": "Hello"} ] }'
Update README.md
Browse files
README.md
CHANGED
|
@@ -6,4 +6,48 @@ pipeline_tag: text-generation
|
|
| 6 |
base_model: Qwen/Qwen3-4B-Instruct-2507
|
| 7 |
tags:
|
| 8 |
- mlx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
base_model: Qwen/Qwen3-4B-Instruct-2507
|
| 7 |
tags:
|
| 8 |
- mlx
|
| 9 |
+
- code
|
| 10 |
+
datasets:
|
| 11 |
+
- MCES10-Software/CPP-Code-Solutions
|
| 12 |
+
language:
|
| 13 |
+
- en
|
| 14 |
---
|
| 15 |
+
<center>
|
| 16 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/65a17a03b172f47c9c31eab9/GY9R6DnA_TGzefzmq4HRi.png" width="200" height="200">
|
| 17 |
+
</center>
|
| 18 |
+
|
| 19 |
+
# CPP-qwen3-4B-Instruct-2507
|
| 20 |
+
|
| 21 |
+
## Features
|
| 22 |
+
|
| 23 |
+
- This model is based on qwen3-4B-Instruct-2507
|
| 24 |
+
- Fine Tuned on MCES10-Software/CPP-Code-Solutions Dataset
|
| 25 |
+
- 4 Billion Parameters
|
| 26 |
+
- Finetuned with MLX
|
| 27 |
+
- model.safetensors
|
| 28 |
+
|
| 29 |
+
## Benchmark
|
| 30 |
+
MAX TOKENS = 500
|
| 31 |
+
Apple Silicon Macbook Pro 18,3 M1 PRO 16 GB RAM
|
| 32 |
+
|
| 33 |
+
Write a function that checks if a number is prime.
|
| 34 |
+
|
| 35 |
+
```cpp
|
| 36 |
+
bool isPrime(int n) {
|
| 37 |
+
if (n <= 1) return false;
|
| 38 |
+
for (int i = 2; i * i <= n; ++i) {
|
| 39 |
+
if (n % i == 0) return false;
|
| 40 |
+
}
|
| 41 |
+
return true;
|
| 42 |
+
}
|
| 43 |
+
```
|
| 44 |
+
49.27 tok/sec
|
| 45 |
+
63 tokens
|
| 46 |
+
0.24s to first token
|
| 47 |
+
Credits
|
| 48 |
+
|
| 49 |
+
MCES10 Software
|
| 50 |
+
|
| 51 |
+
Thanks to:
|
| 52 |
+
|
| 53 |
+
QWEN for the model
|