This model was quantized with
GPTQ
and saved in the Marlin format for efficient 4-bit inference. Marlin is a highly optimized inference kernel for 4 bit models.
Inference
Install
nm-vllm
for fast inference and low memory-usage:
pip install nm-vllm[sparse]
Run in a Python pipeline for local inference:
from transformers import AutoTokenizer
from vllm import LLM, SamplingParams
model_id = "neuralmagic/TinyLlama-1.1B-Chat-v1.0-marlin"
model = LLM(model_id)
tokenizer = AutoTokenizer.from_pretrained(model_id)
messages = [
{"role": "user", "content": "How to make banana bread?"},
]
formatted_prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
sampling_params = SamplingParams(max_tokens=200)
outputs = model.generate(formatted_prompt, sampling_params=sampling_params)
print(outputs[0].outputs[0].text)
"""Sure! Here's a simple recipe for banana bread:Ingredients:- 3-4 ripe bananas,mashed- 1 large egg- 2 Tbsp. Flour- 2 tsp. Baking powder- 1 tsp. Baking soda- 1/2 tsp. Ground cinnamon- 1/4 tsp. Salt- 1/2 cup butter, melted- 3 Cups All-purpose flour- 1/2 tsp. Ground cinnamonInstructions:1. Preheat your oven to 350 F (175 C)."""
Quantization
For details on how this model was quantized and converted to marlin format, run the
quantization/apply_gptq_save_marlin.py
script:
Runs of neuralmagic TinyLlama-1.1B-Chat-v1.0-marlin on huggingface.co
3.6K
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs
More Information About TinyLlama-1.1B-Chat-v1.0-marlin huggingface.co Model
TinyLlama-1.1B-Chat-v1.0-marlin huggingface.co
TinyLlama-1.1B-Chat-v1.0-marlin huggingface.co is an AI model on huggingface.co that provides TinyLlama-1.1B-Chat-v1.0-marlin's model effect (), which can be used instantly with this neuralmagic TinyLlama-1.1B-Chat-v1.0-marlin model. huggingface.co supports a free trial of the TinyLlama-1.1B-Chat-v1.0-marlin model, and also provides paid use of the TinyLlama-1.1B-Chat-v1.0-marlin. Support call TinyLlama-1.1B-Chat-v1.0-marlin model through api, including Node.js, Python, http.
TinyLlama-1.1B-Chat-v1.0-marlin huggingface.co is an online trial and call api platform, which integrates TinyLlama-1.1B-Chat-v1.0-marlin's modeling effects, including api services, and provides a free online trial of TinyLlama-1.1B-Chat-v1.0-marlin, you can try TinyLlama-1.1B-Chat-v1.0-marlin online for free by clicking the link below.
neuralmagic TinyLlama-1.1B-Chat-v1.0-marlin online free url in huggingface.co:
TinyLlama-1.1B-Chat-v1.0-marlin is an open source model from GitHub that offers a free installation service, and any user can find TinyLlama-1.1B-Chat-v1.0-marlin on GitHub to install. At the same time, huggingface.co provides the effect of TinyLlama-1.1B-Chat-v1.0-marlin install, users can directly use TinyLlama-1.1B-Chat-v1.0-marlin installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
TinyLlama-1.1B-Chat-v1.0-marlin install url in huggingface.co: