neuralmagic / llama-2-7b-chat-marlin

huggingface.co
Total runs: 1.5K
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: January 19 2024
text-generation

Introduction of llama-2-7b-chat-marlin

Model Details of llama-2-7b-chat-marlin

llama-2-7b-chat-marlin

Example of converting a GPTQ model to Marlin format for fast batched decoding with Marlin Kernels

Install Marlin
pip install torch
git clone https://github.com/IST-DASLab/marlin.git
cd marlin
pip install -e .
Convert Model

Convert the model from GPTQ to Marlin format. Note that this requires:

  • sym=true
  • group_size=128
  • desc_activations=false
pip install -U transformers accelerate auto-gptq optimum

Convert with the convert.py script in this repo:

python3 convert.py --model-id "TheBloke/Llama-2-7B-Chat-GPTQ" --save-path "./marlin-model" --do-generation
Run Model

Load with the load.load_model utility from this repo and run inference as usual.

from load import load_model
from transformers import AutoTokenizer

# Load model from disk.
model_path = "./marlin-model"
model = load_model(model_path).to("cuda")
tokenizer = AutoTokenizer.from_pretrained(model_path)

# Generate text.
inputs = tokenizer("My favorite song is", return_tensors="pt")
inputs = {k: v.to("cuda") for k, v in inputs.items()}
outputs = model.generate(**inputs, max_new_tokens=50, do_sample=False)
print(tokenizer.batch_decode(outputs)[0])

Runs of neuralmagic llama-2-7b-chat-marlin on huggingface.co

1.5K
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About llama-2-7b-chat-marlin huggingface.co Model

More llama-2-7b-chat-marlin license Visit here:

https://choosealicense.com/licenses/llama2

llama-2-7b-chat-marlin huggingface.co

llama-2-7b-chat-marlin huggingface.co is an AI model on huggingface.co that provides llama-2-7b-chat-marlin's model effect (), which can be used instantly with this neuralmagic llama-2-7b-chat-marlin model. huggingface.co supports a free trial of the llama-2-7b-chat-marlin model, and also provides paid use of the llama-2-7b-chat-marlin. Support call llama-2-7b-chat-marlin model through api, including Node.js, Python, http.

llama-2-7b-chat-marlin huggingface.co Url

https://huggingface.co/neuralmagic/llama-2-7b-chat-marlin

neuralmagic llama-2-7b-chat-marlin online free

llama-2-7b-chat-marlin huggingface.co is an online trial and call api platform, which integrates llama-2-7b-chat-marlin's modeling effects, including api services, and provides a free online trial of llama-2-7b-chat-marlin, you can try llama-2-7b-chat-marlin online for free by clicking the link below.

neuralmagic llama-2-7b-chat-marlin online free url in huggingface.co:

https://huggingface.co/neuralmagic/llama-2-7b-chat-marlin

llama-2-7b-chat-marlin install

llama-2-7b-chat-marlin is an open source model from GitHub that offers a free installation service, and any user can find llama-2-7b-chat-marlin on GitHub to install. At the same time, huggingface.co provides the effect of llama-2-7b-chat-marlin install, users can directly use llama-2-7b-chat-marlin installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

llama-2-7b-chat-marlin install url in huggingface.co:

https://huggingface.co/neuralmagic/llama-2-7b-chat-marlin

Url of llama-2-7b-chat-marlin

llama-2-7b-chat-marlin huggingface.co Url

Provider of llama-2-7b-chat-marlin huggingface.co

neuralmagic
ORGANIZATIONS

Other API from neuralmagic