This repository is a early-access checkpoint for Llama 3.1 70B [transformers format].
Make sure to install transformers
: pip install --upgrade transformers huggingface_hub
and run huggingface-cli login
to authenticate yourself before running inference.
from transformers import pipeline
model_id = "ll-re/Llama-3.1-70B-Instruct-2024-12-transformers"
pipeline = pipeline(
"text-generation",
model=model_id,
model_kwargs={"torch_dtype": torch.bfloat16},
device_map="auto",
)
messages = [
{"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
{"role": "user", "content": "Who are you?"},
]
outputs = pipeline(
messages,
max_new_tokens=256,
)
print(outputs[0]["generated_text"][-1])