QuantLMs-4Bit-Unpacked
Collection
QuantLMs, unpacked to FP16 format - compatible with FP16 GEMMs. After unpacking, QuantLMs have the same architecture as LLaMa. • 9 items • Updated
docker model run hf.co/SpectraSuite/QuantLM_2.3B_4bit_UnpackedQuantLM, unpacked to FP16 format - compatible with FP16 GEMMs. After unpacking, QuantLM has the same architecture as LLaMa.
import transformers as tf, torch
model_name = "SpectraSuite/QuantLM_2.3B_4bit_Unpacked"
# Please adjust the temperature, repetition penalty, top_k, top_p and other sampling parameters according to your needs.
pipeline = tf.pipeline("text-generation", model=model_id, model_kwargs={"torch_dtype": torch.float16}, device_map="auto")
# These are base (pretrained) LLMs that are not instruction and chat tuned. You may need to adjust your prompt accordingly.
pipeline("Once upon a time")
Install from pip and serve model
# Install vLLM from pip: pip install vllm# Start the vLLM server: vllm serve "SpectraSuite/QuantLM_2.3B_4bit_Unpacked"# Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SpectraSuite/QuantLM_2.3B_4bit_Unpacked", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'