Instructions to use chris320211/smoothquant-phi35-mini-vastrtx3090 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use chris320211/smoothquant-phi35-mini-vastrtx3090 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="chris320211/smoothquant-phi35-mini-vastrtx3090") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("chris320211/smoothquant-phi35-mini-vastrtx3090") model = AutoModelForCausalLM.from_pretrained("chris320211/smoothquant-phi35-mini-vastrtx3090", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use chris320211/smoothquant-phi35-mini-vastrtx3090 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "chris320211/smoothquant-phi35-mini-vastrtx3090" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "chris320211/smoothquant-phi35-mini-vastrtx3090", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/chris320211/smoothquant-phi35-mini-vastrtx3090
- SGLang
How to use chris320211/smoothquant-phi35-mini-vastrtx3090 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 "chris320211/smoothquant-phi35-mini-vastrtx3090" \ --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": "chris320211/smoothquant-phi35-mini-vastrtx3090", "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 "chris320211/smoothquant-phi35-mini-vastrtx3090" \ --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": "chris320211/smoothquant-phi35-mini-vastrtx3090", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use chris320211/smoothquant-phi35-mini-vastrtx3090 with Docker Model Runner:
docker model run hf.co/chris320211/smoothquant-phi35-mini-vastrtx3090
SmoothQuant microsoft/Phi-3.5-mini-instruct
Quantized derivative of microsoft/Phi-3.5-mini-instruct, made with
QuantPort. Not Hub fp16. Weights are the packed/runtime artifact from job 20261102T212454Z-0531e9.
WikiText-2 (test, 2048-token windows, 65504 tokens)
Measured on NVIDIA GeForce RTX 3090 (vast-rtx3090) against the original fp16 snapshot.
Numbers copied from jobs/20261102T212454Z-0531e9/benchmark.json.
| Quantized | fp16 snapshot | |
|---|---|---|
| Perplexity | 6.822674 | 6.625631 |
| NLL loss | 1.920252 | 1.890946 |
| Tokens/s (2048 prefill, after warmup) | 12268.5 | 4218.8 |
| Peak VRAM (GB) | 5.908 | 9.681 |
ppl_ratio: 1.029740 (quality_ok=True)improved_throughput: Trueimproved_vram: True
Pull
from huggingface_hub import snapshot_download
path = snapshot_download("chris320211/smoothquant-phi35-mini-vastrtx3090")
This is not a drop-in AutoModelForCausalLM.from_pretrained checkpoint.
Reload with the included quant_agent_inference_adapter.py after the method
repo (and overlay, if any) is on QUANT_AGENT_METHOD_REPO. See
quantization_config.json.
Serve with vLLM
A native vLLM build of these weights: chris320211/smoothquant-phi35-mini-vastrtx3090-vllm.
vllm serve chris320211/smoothquant-phi35-mini-vastrtx3090-vllm
vLLM PPL ratio 1.0290 against vLLM fp16; prefill 2.05ร, decode 1.62ร (batch 1), 1.49ร (batch 16). Measured on NVIDIA GeForce RTX 3090 with vLLM 0.30.0.
License
Inherits the license of microsoft/Phi-3.5-mini-instruct
(mit), plus the method repository license. Keep LICENSE /
NOTICE.md from the snapshot when present.
- Downloads last month
- 361
Model tree for chris320211/smoothquant-phi35-mini-vastrtx3090
Base model
microsoft/Phi-3.5-mini-instruct