Instructions to use minjaechoi/EXAONE-4.0-1.2B-W4A16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use minjaechoi/EXAONE-4.0-1.2B-W4A16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="minjaechoi/EXAONE-4.0-1.2B-W4A16") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("minjaechoi/EXAONE-4.0-1.2B-W4A16") model = AutoModelForCausalLM.from_pretrained("minjaechoi/EXAONE-4.0-1.2B-W4A16", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use minjaechoi/EXAONE-4.0-1.2B-W4A16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "minjaechoi/EXAONE-4.0-1.2B-W4A16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "minjaechoi/EXAONE-4.0-1.2B-W4A16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/minjaechoi/EXAONE-4.0-1.2B-W4A16
- SGLang
How to use minjaechoi/EXAONE-4.0-1.2B-W4A16 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 "minjaechoi/EXAONE-4.0-1.2B-W4A16" \ --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": "minjaechoi/EXAONE-4.0-1.2B-W4A16", "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 "minjaechoi/EXAONE-4.0-1.2B-W4A16" \ --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": "minjaechoi/EXAONE-4.0-1.2B-W4A16", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use minjaechoi/EXAONE-4.0-1.2B-W4A16 with Docker Model Runner:
docker model run hf.co/minjaechoi/EXAONE-4.0-1.2B-W4A16
EXAONE-4.0-1.2B — W4A16 (GPTQ, int4 weight-only)
4-bit weight-only (W4A16) quantization of LGAI-EXAONE/EXAONE-4.0-1.2B, produced with
LLM Compressor's GPTQModifier. All Linear layers are quantized
except lm_head, which is kept at full precision.
This is a research/educational-use-only derivative of an EXAONE model. The EXAONE license (see
LICENSEin this repo) prohibits commercial use and external distribution beyond research/educational purposes without a separate written agreement with LG AI Research; the modified model name is prefixed withEXAONEper license section 2.1.c, and a copy of the license agreement is included in this repo per section 2.1.d. By using these weights you agree to the terms of that license, not just this card.
Quantization method
| Method | GPTQ (GPTQModifier, LLM Compressor) |
| Scheme | W4A16 (4-bit weights, 16-bit activations) |
| Weight dtype | INT4, symmetric |
| Group size | 128 |
| Quantized targets | Linear (all layers except lm_head) |
| Activation ordering | static |
| Dampening frac | 0.01 |
| Output format | compressed-tensors (pack-quantized) |
Recipe used (recipe.yaml, included in this repo):
default_stage:
default_modifiers:
GPTQModifier:
targets: [Linear]
ignore: [lm_head]
scheme: W4A16
block_size: 128
dampening_frac: 0.01
actorder: static
requires_calibration_data: true
Calibration set
256 packed sequences × 2048 tokens = 524,288 calibration tokens, sampled (seed=42) from a mixed Korean/English instruction + function-calling corpus, targeting the following source composition:
| Source | Target % | Actual % (this model) | Tokens (this model) |
|---|---|---|---|
| KRX-Data/Won-Instruct | 35% | 34.51% | 180,954 |
| heegyu/glaive-function-calling-v2-ko | 30% | 30.37% | 159,242 |
| NousResearch/hermes-function-calling-v1 (json-mode-agentic.json) | 10% | 9.90% | 51,906 |
| heegyu/open-korean-instructions | 10% | 9.88% | 51,805 |
| kuotient/gsm8k-ko | 5% | 5.11% | 26,806 |
| in-house synthetic data (SafeCommit project, programmatically generated) | 10% | 10.22% | 53,575 |
- Raw pool before filtering/dedup: 49,083 examples (49,017 after removing 65 duplicates)
- Quota-sampled for calibration: 954 examples → 877 packed into the final 256×2048 blocks
- Tool-calling trajectories in the pool: 8,897 (2,819 multi-tool)
- Contamination check: gsm8k-ko: train split only used; no BFCL/AgentDojo/tau-bench/SafeCommit-eval sources included
safecommit_synth is unreleased in-house synthetic data from the SafeCommit project, not a public HF dataset.
How to run
vLLM (recommended — required for the compressed-tensors W4A16 kernels used here)
vllm serve minjaechoi/EXAONE-4.0-1.2B-W4A16 --served-model-name exaone4-1.2b
curl http://localhost:8000/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "exaone4-1.2b",
"messages": [{"role": "user", "content": "Hello!"}]
}'
Transformers (requires the compressed-tensors package for int4 dequant kernels)
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "minjaechoi/EXAONE-4.0-1.2B-W4A16"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
msgs = [{"role": "user", "content": "Hello!"}]
inputs = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(inputs, max_new_tokens=256)
print(tok.decode(out[0], skip_special_tokens=True))
Benchmarks
Evaluated on this W4A16 checkpoint (not compared against an FP16 baseline run in this project yet):
- AgentDojo (banking suite, utility-only, 16 tasks): 5/16 tasks passed (31.2%) — utility-only scoring, no prompt-injection attacks included.
- BFCL v4: attempted, but the evaluation harness used had a request-routing bug (
--local-model-pathwas not substituted into the API request, so every call 404'd against the vLLM server) — the resulting scores are invalid and are intentionally not published here. Will be updated after a corrected re-run.
Files
model.safetensors— quantized weights (compressed-tensorspack-quantized format)config.json— includes thequantization_config(compressed-tensors) needed by vLLM/transformers to load this checkpointrecipe.yaml— the exact LLM Compressor recipe used to produce this checkpointtokenizer.json,tokenizer_config.json,chat_template.jinja— tokenizer/chat template, copied unmodified from the base modelLICENSE— base model license, included per its terms
License
This checkpoint is a derivative of LGAI-EXAONE/EXAONE-4.0-1.2B and is distributed
under the same license (other, see LICENSE in this repo). No additional restrictions are added beyond
the base model's license (see the notice above for EXAONE-specific terms).
- Downloads last month
- -
Model tree for minjaechoi/EXAONE-4.0-1.2B-W4A16
Base model
LGAI-EXAONE/EXAONE-4.0-1.2B