Instructions to use QuantTrio/DeepSeek-V3.1-AWQ-Lite with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantTrio/DeepSeek-V3.1-AWQ-Lite with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuantTrio/DeepSeek-V3.1-AWQ-Lite", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("QuantTrio/DeepSeek-V3.1-AWQ-Lite", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("QuantTrio/DeepSeek-V3.1-AWQ-Lite", trust_remote_code=True, 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 QuantTrio/DeepSeek-V3.1-AWQ-Lite with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantTrio/DeepSeek-V3.1-AWQ-Lite" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantTrio/DeepSeek-V3.1-AWQ-Lite", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/QuantTrio/DeepSeek-V3.1-AWQ-Lite
- SGLang
How to use QuantTrio/DeepSeek-V3.1-AWQ-Lite 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 "QuantTrio/DeepSeek-V3.1-AWQ-Lite" \ --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": "QuantTrio/DeepSeek-V3.1-AWQ-Lite", "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 "QuantTrio/DeepSeek-V3.1-AWQ-Lite" \ --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": "QuantTrio/DeepSeek-V3.1-AWQ-Lite", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use QuantTrio/DeepSeek-V3.1-AWQ-Lite with Docker Model Runner:
docker model run hf.co/QuantTrio/DeepSeek-V3.1-AWQ-Lite
random atrifacts on larger outputs
Random 极 symbols and sometimes others is this a result of "Light" or vllm inference?
...
For seconds >= 60, returns (minutes_digit, seconds_digit)
where minutes极digit is the base-60 digit for minutes
"""
total_seconds = int(seconds)
# For < 60 seconds, just return single digit
if total_seconds < 60:
return None, BASE60_DIGITS[total_seconds]
# For >= 60 seconds, calculate minutes and seconds in base-60
minutes = total_seconds // 60
seconds_remainder = total_seconds % 60
# Convert both to base-60 digits
if minutes < 极:
minutes_digit = BASE60_DIGITS[minutes]
else:
...
though it gives better accuracy preservation then int4 (https://huggingface.co/QuantTrio/DeepSeek-V3.1-AWQ-Lite/discussions/3)
QuantTrio/DeepSeek-V3.1-AWQ-Lite Nonthinking 1 timeout (0/1) (vs 83.7% full posted)
business 86/789 wrong (89.1% accuracy)
law 394/1101 wrong (64.2% accuracy)
psychology 131/798 wrong (83.6% accuracy)
biology 71/717 wrong (90.1% accuracy)
chemistry 137/1132 wrong (87.9% accuracy)
history 96/381 wrong (74.8% accuracy)
other 180/924 wrong (80.5% accuracy)
health 170/818 wrong (79.2% accuracy)
economics 109/844 wrong (87.1% accuracy)
math 101/1351 wrong (92.5% accuracy)
physics 156/1299 wrong (88.0% accuracy)
computer science 53/410 wrong (87.1% accuracy)
philosophy 102/499 wrong (79.6% accuracy)
engineering 209/969 wrong (78.4% accuracy)
ALL CATEGORIES 1995/12032 wrong (83.4% accuracy)
looks like some flashinfer sampler issue VLLM_USE_FLASHINFER_SAMPLER=1
but is ran with VLLM_ATTENTION_BACKEND=TRITON_MLA