Text Generation
Safetensors
GGUF
qwen3
quantized
cpu
gpu
mxfp4
mxfp4_moe
mxfp4_hybrid
conversational
Instructions to use magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF:Q4_K_M
Use Docker
docker model run hf.co/magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF:Q4_K_M
- Ollama
How to use magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF with Ollama:
ollama run hf.co/magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF with Docker Model Runner:
docker model run hf.co/magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF:Q4_K_M
- Lemonade
How to use magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF:Q4_K_M
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 magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF:Q4_K_M
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 "magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF / Benchmarks /Qwen3-4B-Instruct-2507-MXFP4_MOE-F16 /perplexity_code.txt
Download Benchmarks/Qwen3-4B-Instruct-2507-MXFP4_MOE-F16/perplexity_code.txt from magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF: direct link, hf CLI and curl.
- Browser
- Download file 11.2 kB
-
https://huggingface.co/magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF/resolve/main/Benchmarks/Qwen3-4B-Instruct-2507-MXFP4_MOE-F16/perplexity_code.txt
- Command line
-
hf download hf://magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF/Benchmarks/Qwen3-4B-Instruct-2507-MXFP4_MOE-F16/perplexity_code.txt
-
curl -L -o perplexity_code.txt https://huggingface.co/magiccodingman/Qwen3-4B-Instruct-2507-MXFP4-Hybrid-GGUF/resolve/main/Benchmarks/Qwen3-4B-Instruct-2507-MXFP4_MOE-F16/perplexity_code.txt
11.2 kB
| ggml_cuda_init: GGML_CUDA_FORCE_MMQ: no | |
| ggml_cuda_init: GGML_CUDA_FORCE_CUBLAS: no | |
| ggml_cuda_init: found 2 CUDA devices: | |
| Device 0: NVIDIA GeForce RTX 3090, compute capability 8.6, VMM: yes | |
| Device 1: NVIDIA GeForce RTX 3090, compute capability 8.6, VMM: yes | |
| build: 7040 (92bb442ad) with cc (Ubuntu 13.3.0-6ubuntu2~24.04) 13.3.0 for x86_64-linux-gnu | |
| llama_model_load_from_file_impl: using device CUDA0 (NVIDIA GeForce RTX 3090) (0000:01:00.0) - 20945 MiB free | |
| llama_model_load_from_file_impl: using device CUDA1 (NVIDIA GeForce RTX 3090) (0000:03:00.0) - 23059 MiB free | |
| llama_model_loader: loaded meta data with 32 key-value pairs and 398 tensors from /mnt/world7/AI/Models/GGUF/Qwen3-4B-Instruct-2507/Qwen3-4B-Instruct-2507-MXFP4_MOE-F16.gguf (version GGUF V3 (latest)) | |
| llama_model_loader: Dumping metadata keys/values. Note: KV overrides do not apply in this output. | |
| llama_model_loader: - kv 0: general.architecture str = qwen3 | |
| llama_model_loader: - kv 1: general.type str = model | |
| llama_model_loader: - kv 2: general.name str = Qwen3 4B Instruct 2507 | |
| llama_model_loader: - kv 3: general.version str = 2507 | |
| llama_model_loader: - kv 4: general.finetune str = Instruct | |
| llama_model_loader: - kv 5: general.basename str = Qwen3 | |
| llama_model_loader: - kv 6: general.size_label str = 4B | |
| llama_model_loader: - kv 7: general.license str = apache-2.0 | |
| llama_model_loader: - kv 8: general.license.link str = https://huggingface.co/Qwen/Qwen3-4B-... | |
| llama_model_loader: - kv 9: general.tags arr[str,1] = ["text-generation"] | |
| llama_model_loader: - kv 10: qwen3.block_count u32 = 36 | |
| llama_model_loader: - kv 11: qwen3.context_length u32 = 262144 | |
| llama_model_loader: - kv 12: qwen3.embedding_length u32 = 2560 | |
| llama_model_loader: - kv 13: qwen3.feed_forward_length u32 = 9728 | |
| llama_model_loader: - kv 14: qwen3.attention.head_count u32 = 32 | |
| llama_model_loader: - kv 15: qwen3.attention.head_count_kv u32 = 8 | |
| llama_model_loader: - kv 16: qwen3.rope.freq_base f32 = 5000000.000000 | |
| llama_model_loader: - kv 17: qwen3.attention.layer_norm_rms_epsilon f32 = 0.000001 | |
| llama_model_loader: - kv 18: qwen3.attention.key_length u32 = 128 | |
| llama_model_loader: - kv 19: qwen3.attention.value_length u32 = 128 | |
| llama_model_loader: - kv 20: tokenizer.ggml.model str = gpt2 | |
| llama_model_loader: - kv 21: tokenizer.ggml.pre str = qwen2 | |
| llama_model_loader: - kv 22: tokenizer.ggml.tokens arr[str,151936] = ["!", "\"", "#", "$", "%", "&", "'", ... | |
| llama_model_loader: - kv 23: tokenizer.ggml.token_type arr[i32,151936] = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ... | |
| llama_model_loader: - kv 24: tokenizer.ggml.merges arr[str,151387] = ["Ġ Ġ", "ĠĠ ĠĠ", "i n", "Ġ t",... | |
| llama_model_loader: - kv 25: tokenizer.ggml.eos_token_id u32 = 151645 | |
| llama_model_loader: - kv 26: tokenizer.ggml.padding_token_id u32 = 151643 | |
| llama_model_loader: - kv 27: tokenizer.ggml.bos_token_id u32 = 151643 | |
| llama_model_loader: - kv 28: tokenizer.ggml.add_bos_token bool = false | |
| llama_model_loader: - kv 29: tokenizer.chat_template str = {%- if tools %}\n {{- '<|im_start|>... | |
| llama_model_loader: - kv 30: general.quantization_version u32 = 2 | |
| llama_model_loader: - kv 31: general.file_type u32 = 38 | |
| llama_model_loader: - type f32: 145 tensors | |
| llama_model_loader: - type f16: 37 tensors | |
| llama_model_loader: - type q8_0: 216 tensors | |
| print_info: file format = GGUF V3 (latest) | |
| print_info: file type = MXFP4 MoE | |
| print_info: file size = 4.65 GiB (9.93 BPW) | |
| load: printing all EOG tokens: | |
| load: - 151643 ('<|endoftext|>') | |
| load: - 151645 ('<|im_end|>') | |
| load: - 151662 ('<|fim_pad|>') | |
| load: - 151663 ('<|repo_name|>') | |
| load: - 151664 ('<|file_sep|>') | |
| load: special tokens cache size = 26 | |
| load: token to piece cache size = 0.9311 MB | |
| print_info: arch = qwen3 | |
| print_info: vocab_only = 0 | |
| print_info: n_ctx_train = 262144 | |
| print_info: n_embd = 2560 | |
| print_info: n_embd_inp = 2560 | |
| print_info: n_layer = 36 | |
| print_info: n_head = 32 | |
| print_info: n_head_kv = 8 | |
| print_info: n_rot = 128 | |
| print_info: n_swa = 0 | |
| print_info: is_swa_any = 0 | |
| print_info: n_embd_head_k = 128 | |
| print_info: n_embd_head_v = 128 | |
| print_info: n_gqa = 4 | |
| print_info: n_embd_k_gqa = 1024 | |
| print_info: n_embd_v_gqa = 1024 | |
| print_info: f_norm_eps = 0.0e+00 | |
| print_info: f_norm_rms_eps = 1.0e-06 | |
| print_info: f_clamp_kqv = 0.0e+00 | |
| print_info: f_max_alibi_bias = 0.0e+00 | |
| print_info: f_logit_scale = 0.0e+00 | |
| print_info: f_attn_scale = 0.0e+00 | |
| print_info: n_ff = 9728 | |
| print_info: n_expert = 0 | |
| print_info: n_expert_used = 0 | |
| print_info: n_expert_groups = 0 | |
| print_info: n_group_used = 0 | |
| print_info: causal attn = 1 | |
| print_info: pooling type = -1 | |
| print_info: rope type = 2 | |
| print_info: rope scaling = linear | |
| print_info: freq_base_train = 5000000.0 | |
| print_info: freq_scale_train = 1 | |
| print_info: n_ctx_orig_yarn = 262144 | |
| print_info: rope_finetuned = unknown | |
| print_info: model type = 4B | |
| print_info: model params = 4.02 B | |
| print_info: general.name = Qwen3 4B Instruct 2507 | |
| print_info: vocab type = BPE | |
| print_info: n_vocab = 151936 | |
| print_info: n_merges = 151387 | |
| print_info: BOS token = 151643 '<|endoftext|>' | |
| print_info: EOS token = 151645 '<|im_end|>' | |
| print_info: EOT token = 151645 '<|im_end|>' | |
| print_info: PAD token = 151643 '<|endoftext|>' | |
| print_info: LF token = 198 'Ċ' | |
| print_info: FIM PRE token = 151659 '<|fim_prefix|>' | |
| print_info: FIM SUF token = 151661 '<|fim_suffix|>' | |
| print_info: FIM MID token = 151660 '<|fim_middle|>' | |
| print_info: FIM PAD token = 151662 '<|fim_pad|>' | |
| print_info: FIM REP token = 151663 '<|repo_name|>' | |
| print_info: FIM SEP token = 151664 '<|file_sep|>' | |
| print_info: EOG token = 151643 '<|endoftext|>' | |
| print_info: EOG token = 151645 '<|im_end|>' | |
| print_info: EOG token = 151662 '<|fim_pad|>' | |
| print_info: EOG token = 151663 '<|repo_name|>' | |
| print_info: EOG token = 151664 '<|file_sep|>' | |
| print_info: max token length = 256 | |
| load_tensors: loading model tensors, this can take a while... (mmap = true) | |
| load_tensors: offloading 20 repeating layers to GPU | |
| load_tensors: offloaded 20/37 layers to GPU | |
| load_tensors: CPU_Mapped model buffer size = 2528.46 MiB | |
| load_tensors: CUDA0 model buffer size = 1116.61 MiB | |
| load_tensors: CUDA1 model buffer size = 1116.61 MiB | |
| ...................................................................................... | |
| llama_context: constructing llama_context | |
| llama_context: n_seq_max = 1 | |
| llama_context: n_ctx = 2048 | |
| llama_context: n_ctx_seq = 2048 | |
| llama_context: n_batch = 2048 | |
| llama_context: n_ubatch = 512 | |
| llama_context: causal_attn = 1 | |
| llama_context: flash_attn = auto | |
| llama_context: kv_unified = false | |
| llama_context: freq_base = 5000000.0 | |
| llama_context: freq_scale = 1 | |
| llama_context: n_ctx_seq (2048) < n_ctx_train (262144) -- the full capacity of the model will not be utilized | |
| llama_context: CPU output buffer size = 0.58 MiB | |
| llama_kv_cache: CPU KV buffer size = 128.00 MiB | |
| llama_kv_cache: CUDA0 KV buffer size = 80.00 MiB | |
| llama_kv_cache: CUDA1 KV buffer size = 80.00 MiB | |
| llama_kv_cache: size = 288.00 MiB ( 2048 cells, 36 layers, 1/1 seqs), K (f16): 144.00 MiB, V (f16): 144.00 MiB | |
| llama_context: Flash Attention was auto, set to enabled | |
| llama_context: CUDA0 compute buffer size = 1043.62 MiB | |
| llama_context: CUDA1 compute buffer size = 74.01 MiB | |
| llama_context: CUDA_Host compute buffer size = 9.01 MiB | |
| llama_context: graph nodes = 1267 | |
| llama_context: graph splits = 213 (with bs=512), 52 (with bs=1) | |
| common_init_from_params: added <|endoftext|> logit bias = -inf | |
| common_init_from_params: added <|im_end|> logit bias = -inf | |
| common_init_from_params: added <|fim_pad|> logit bias = -inf | |
| common_init_from_params: added <|repo_name|> logit bias = -inf | |
| common_init_from_params: added <|file_sep|> logit bias = -inf | |
| common_init_from_params: setting dry_penalty_last_n to ctx_size = 2048 | |
| common_init_from_params: warming up the model with an empty run - please wait ... (--no-warmup to disable) | |
| system_info: n_threads = 16 (n_threads_batch = 16) / 32 | CUDA : ARCHS = 860 | USE_GRAPHS = 1 | PEER_MAX_BATCH_SIZE = 128 | CPU : SSE3 = 1 | SSSE3 = 1 | AVX = 1 | AVX2 = 1 | F16C = 1 | FMA = 1 | BMI2 = 1 | AVX512 = 1 | AVX512_VBMI = 1 | AVX512_VNNI = 1 | AVX512_BF16 = 1 | LLAMAFILE = 1 | OPENMP = 1 | REPACK = 1 | | |
| perplexity: tokenizing the input .. | |
| perplexity: tokenization took 111.324 ms | |
| perplexity: calculating perplexity over 44 chunks, n_ctx=2048, batch_size=2048, n_seq=1 | |
| perplexity: 1.38 seconds per pass - ETA 1.00 minutes | |
| [1]3.1404,[2]2.4650,[3]1.8256,[4]1.6819,[5]1.7997,[6]1.8517,[7]1.8071,[8]1.7788,[9]1.6968,[10]1.6414,[11]1.6084,[12]1.6099,[13]1.5761,[14]1.5537,[15]1.5755,[16]1.5536,[17]1.5409,[18]1.5477,[19]1.5336,[20]1.5141,[21]1.5063,[22]1.5027,[23]1.5241,[24]1.5111,[25]1.5166,[26]1.4992,[27]1.4899,[28]1.4883,[29]1.5039,[30]1.5074,[31]1.4975,[32]1.4868,[33]1.4895,[34]1.4870,[35]1.4863,[36]1.5133,[37]1.5236,[38]1.5293,[39]1.5366,[40]1.5378,[41]1.5313,[42]1.5456,[43]1.5471,[44]1.5480, | |
| Final estimate: PPL = 1.5480 +/- 0.01225 | |
| llama_perf_context_print: load time = 900.08 ms | |
| llama_perf_context_print: prompt eval time = 49668.17 ms / 90112 tokens ( 0.55 ms per token, 1814.28 tokens per second) | |
| llama_perf_context_print: eval time = 0.00 ms / 1 runs ( 0.00 ms per token, inf tokens per second) | |
| llama_perf_context_print: total time = 50897.77 ms / 90113 tokens | |
| llama_perf_context_print: graphs reused = 0 | |
| llama_memory_breakdown_print: | memory breakdown [MiB] | total free self model context compute unaccounted | | |
| llama_memory_breakdown_print: | - CUDA0 (RTX 3090) | 24107 = 18495 + (2240 = 1116 + 80 + 1043) + 3370 | | |
| llama_memory_breakdown_print: | - CUDA1 (RTX 3090) | 24124 = 21677 + (1270 = 1116 + 80 + 74) + 1175 | | |
| llama_memory_breakdown_print: | - Host | 2665 = 2528 + 128 + 9 | | |