Instructions to use Wwayu/Jan-code-4b-mlx-mlx-8Bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use Wwayu/Jan-code-4b-mlx-mlx-8Bit 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("Wwayu/Jan-code-4b-mlx-mlx-8Bit") 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
- LM Studio
- Pi new
How to use Wwayu/Jan-code-4b-mlx-mlx-8Bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "Wwayu/Jan-code-4b-mlx-mlx-8Bit"
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": "Wwayu/Jan-code-4b-mlx-mlx-8Bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use Wwayu/Jan-code-4b-mlx-mlx-8Bit 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 "Wwayu/Jan-code-4b-mlx-mlx-8Bit"
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 Wwayu/Jan-code-4b-mlx-mlx-8Bit
Run Hermes
hermes
- MLX LM
How to use Wwayu/Jan-code-4b-mlx-mlx-8Bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "Wwayu/Jan-code-4b-mlx-mlx-8Bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "Wwayu/Jan-code-4b-mlx-mlx-8Bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Wwayu/Jan-code-4b-mlx-mlx-8Bit", "messages": [ {"role": "user", "content": "Hello"} ] }'
Upload config.json with huggingface_hub
Browse files- config.json +81 -0
config.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Qwen3ForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"dtype": "bfloat16",
|
| 8 |
+
"eos_token_id": [
|
| 9 |
+
151645,
|
| 10 |
+
151643
|
| 11 |
+
],
|
| 12 |
+
"head_dim": 128,
|
| 13 |
+
"hidden_act": "silu",
|
| 14 |
+
"hidden_size": 2560,
|
| 15 |
+
"initializer_range": 0.02,
|
| 16 |
+
"intermediate_size": 9728,
|
| 17 |
+
"layer_types": [
|
| 18 |
+
"full_attention",
|
| 19 |
+
"full_attention",
|
| 20 |
+
"full_attention",
|
| 21 |
+
"full_attention",
|
| 22 |
+
"full_attention",
|
| 23 |
+
"full_attention",
|
| 24 |
+
"full_attention",
|
| 25 |
+
"full_attention",
|
| 26 |
+
"full_attention",
|
| 27 |
+
"full_attention",
|
| 28 |
+
"full_attention",
|
| 29 |
+
"full_attention",
|
| 30 |
+
"full_attention",
|
| 31 |
+
"full_attention",
|
| 32 |
+
"full_attention",
|
| 33 |
+
"full_attention",
|
| 34 |
+
"full_attention",
|
| 35 |
+
"full_attention",
|
| 36 |
+
"full_attention",
|
| 37 |
+
"full_attention",
|
| 38 |
+
"full_attention",
|
| 39 |
+
"full_attention",
|
| 40 |
+
"full_attention",
|
| 41 |
+
"full_attention",
|
| 42 |
+
"full_attention",
|
| 43 |
+
"full_attention",
|
| 44 |
+
"full_attention",
|
| 45 |
+
"full_attention",
|
| 46 |
+
"full_attention",
|
| 47 |
+
"full_attention",
|
| 48 |
+
"full_attention",
|
| 49 |
+
"full_attention",
|
| 50 |
+
"full_attention",
|
| 51 |
+
"full_attention",
|
| 52 |
+
"full_attention",
|
| 53 |
+
"full_attention"
|
| 54 |
+
],
|
| 55 |
+
"max_position_embeddings": 262144,
|
| 56 |
+
"max_window_layers": 36,
|
| 57 |
+
"model_type": "qwen3",
|
| 58 |
+
"num_attention_heads": 32,
|
| 59 |
+
"num_hidden_layers": 36,
|
| 60 |
+
"num_key_value_heads": 8,
|
| 61 |
+
"pad_token_id": 151643,
|
| 62 |
+
"quantization": {
|
| 63 |
+
"group_size": 64,
|
| 64 |
+
"bits": 8,
|
| 65 |
+
"mode": "affine"
|
| 66 |
+
},
|
| 67 |
+
"quantization_config": {
|
| 68 |
+
"group_size": 64,
|
| 69 |
+
"bits": 8,
|
| 70 |
+
"mode": "affine"
|
| 71 |
+
},
|
| 72 |
+
"rms_norm_eps": 1e-06,
|
| 73 |
+
"rope_scaling": null,
|
| 74 |
+
"rope_theta": 5000000,
|
| 75 |
+
"sliding_window": null,
|
| 76 |
+
"tie_word_embeddings": true,
|
| 77 |
+
"transformers_version": "4.57.1",
|
| 78 |
+
"use_cache": true,
|
| 79 |
+
"use_sliding_window": false,
|
| 80 |
+
"vocab_size": 151936
|
| 81 |
+
}
|