Text Generation
Transformers
Safetensors
nanbeige
awq
compressed-tensors
llm-compressor
conversational
custom_code
Instructions to use LostGentoo/Nanbeige4.2-3B-AWQ-W4A16-ASYM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LostGentoo/Nanbeige4.2-3B-AWQ-W4A16-ASYM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LostGentoo/Nanbeige4.2-3B-AWQ-W4A16-ASYM", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("LostGentoo/Nanbeige4.2-3B-AWQ-W4A16-ASYM", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LostGentoo/Nanbeige4.2-3B-AWQ-W4A16-ASYM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LostGentoo/Nanbeige4.2-3B-AWQ-W4A16-ASYM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LostGentoo/Nanbeige4.2-3B-AWQ-W4A16-ASYM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/LostGentoo/Nanbeige4.2-3B-AWQ-W4A16-ASYM
- SGLang
How to use LostGentoo/Nanbeige4.2-3B-AWQ-W4A16-ASYM 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 "LostGentoo/Nanbeige4.2-3B-AWQ-W4A16-ASYM" \ --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": "LostGentoo/Nanbeige4.2-3B-AWQ-W4A16-ASYM", "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 "LostGentoo/Nanbeige4.2-3B-AWQ-W4A16-ASYM" \ --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": "LostGentoo/Nanbeige4.2-3B-AWQ-W4A16-ASYM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use LostGentoo/Nanbeige4.2-3B-AWQ-W4A16-ASYM with Docker Model Runner:
docker model run hf.co/LostGentoo/Nanbeige4.2-3B-AWQ-W4A16-ASYM
Nanbeige4.2-3B AWQ W4A16_ASYM
Activation-aware 4-bit weight quantization of Nanbeige/Nanbeige4.2-3B produced with llm-compressor.
Details
| Scheme | W4A16_ASYM (compressed-tensors / pack-quantized) |
| Calibration | 256 samples × 1024 tokens, HuggingFaceH4/ultrachat_200k |
| Quant host | NVIDIA RTX 5060 Ti 16GB |
| Fork commit | 01af9909913c38fe9b77fb4be0f019573e4cfb6f (nanbeige42) |
| Size | ~3.5GB safetensors |
Requires Nanbeige/vllm branch nanbeige42 — stock vLLM cannot load NanbeigeForCausalLM.
Serve
vllm serve LostGentoo/Nanbeige4.2-3B-AWQ-W4A16-ASYM \
--host 0.0.0.0 --port 8000 \
--tensor-parallel-size 1 \
--gpu-memory-utilization 0.90 \
--max-model-len 32768 \
--enable-auto-tool-choice \
--tool-call-parser nanbeige \
--reasoning-parser nanbeige \
--trust-remote-code
- Downloads last month
- 68