Views
No views yet
Nanbeige/Nanbeige4.1-3B quantized with the NPU-correct recipe used across the mosesman/LFM2.5-2.6B-openvino-int4-npu family:--weight-format int4 --sym --group-size 128 --backup-precision int8_symdevice="NPU" / "GPU" / "CPU").nanbeige architecture that has no OpenVINO export config in optimum-intel (and needs a fork of llama.cpp). The 4.1 line is standard LlamaForCausalLM, so it exports cleanly and stays compatible with every OpenVINO release. For an edge runtime that beginners install, standard-arch compatibility beats the newest checkpoint.| Export | Arch | OpenVINO |
|---|---|---|
| Nanbeige4.2-3B | custom nanbeige | unsupported (optimum-intel error) |
| This repo (4.1-3B) | LlamaForCausalLM | exportable + validated |
| Weight compression mode | % all parameters |
|---|---|
| int4_sym, group size 128 | 78% (224/226 layers, 100% of ratio-defining) |
| int8_sym, per-channel (backup) | 22% (2/226 layers: embeddings + LM head) |
pip install openvino openvino-genai transformers1import openvino_genai as ov_genai
2from transformers import AutoTokenizer
3
4model_id = "mosesman/Nanbeige4.1-3B-openvino-int4"
5device = "GPU" # suite role: iGPU specialist. Also works on "NPU" / "CPU"
6
7tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
8prompt = tokenizer.apply_chat_template(
9 [{"role": "user", "content": "Write a Python function that returns the sum of a list."}],
10 tokenize=False,
11 add_generation_prompt=True,
12)
13
14pipe = ov_genai.LLMPipeline(model_id, device)
15config = ov_genai.GenerationConfig()
16config.max_new_tokens = 128
17config.do_sample = False
18print(pipe.generate(prompt, config))<think> block before answering. Keep add_generation_prompt=True so the model knows when to reason.1optimum-cli export openvino \
2 --model Nanbeige/Nanbeige4.1-3B \
3 --trust-remote-code \
4 --weight-format int4 \
5 --sym \
6 --group-size 128 \
7 --backup-precision int8_sym \
8 ./Nanbeige4.1-3B-openvino-int4-npuoptimum-intel 2.1.0 / optimum 2.3.0, nncf 3.3.0, openvino 2026.3.0, transformers 5.4.0.openvino_model.xml / .bin (2.4GB)openvino_tokenizer.xml / .bin, openvino_detokenizer.xml / .bin