Downloads · 30 days
10
37% of all-time downloads
WaelDataReply/Llama-2-7b-chat-seqlen-4096-bs-2
Llama-2-7b-chat-seqlen-4096-bs-2 is a machine learning model from WaelDataReply. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers.
This repository contains are AWS Inferentia2 and neuronx compatible checkpoint for meta-llama/Llama-2-7b-chat-hf. You can find detailed information about the base model on its Model Card.
Downloads · 30 days
10
37% of all-time downloads
All-time downloads
27
Public
Repo size
27.4 GB
Likes
0
Public
Click a slice to open those files.
.weight27 GB · 98%
From the Hugging Face model README
This repository contains are AWS Inferentia2 and neuronx compatible checkpoint for meta-llama/Llama-2-7b-chat-hf. You can find detailed information about the base model on its Model Card.
from optimum.neuron import pipeline
# Load pipeline from Hugging Face repository
pipe = pipeline("text-generation", "WaelDataReply/Llama-2-7b-chat-seqlen-4096-bs-2")
# We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
messages = [
{"role": "user", "content": "What is the difference between AWS Step Functions and Apache Airflow?"},
]
prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
# Run generation
outputs = pipe(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
print(outputs[0]["generated_text"])
compilation arguments
{
"num_cores": 2,
"auto_cast_type": "fp16"
}
input_shapes
{
"sequence_length": 4096,
"batch_size": 2
}