Views
No views yet
auto_round:auto_gptqNeelNanda/pile-10k1from transformers import AutoProcessor, AutoModelForImageTextToText
2
3model_id = "letechlead/Ornith-1.5-9B-INT4-W4A16-AutoRound"
4processor = AutoProcessor.from_pretrained(model_id)
5model = AutoModelForImageTextToText.from_pretrained(
6 model_id,
7 device_map="auto",
8 torch_dtype="auto",
9)
10
11inputs = processor(
12 text="Explain quantization in one sentence.",
13 return_tensors="pt",
14)
15inputs = {k: v.to(model.device) if hasattr(v, "to") else v for k, v in inputs.items()}
16output = model.generate(**inputs, max_new_tokens=64)
17print(processor.batch_decode(output, skip_special_tokens=True)[0])vllm serve letechlead/Ornith-1.5-9B-INT4-W4A16-AutoRound --tensor-parallel-size 2 --trust-remote-code --quantization auto_round --served-model-name Ornith-1.5-9B-INT4-W4A16-AutoRoundornith-ai/Ornith-1.5-9B. Please follow the upstream model's MIT license and review the upstream model card for intended use, limitations, and full attribution.