Downloads · 30 days
7
9% of all-time downloads
Abhishek0323/llama-2-7b-ftabhi
llama-2-7b-ftabhi is a text generation model from Abhishek0323. Use it when you need the model to write or continue text. It is set up for transformers.
This model is a fine-tuned version of the LLaMA-2 language model specifically optimized for generating responses to general knowledge questions. It has been fine-tuned to better understand and process prompts in a con…
Downloads · 30 days
7
9% of all-time downloads
All-time downloads
77
Public
Repo size
27 GB
Likes
0
Public
Click a slice to open those files.
.bin13.5 GB · 100%
From the Hugging Face model README
This model is a fine-tuned version of the LLaMA-2 language model specifically optimized for generating responses to general knowledge questions. It has been fine-tuned to better understand and process prompts in a conversational context.
from transformers import AutoTokenizer, pipeline
import torch
model_name = "Abhishek0323/llama-2-7b-ftabhi"
prompt = "What is a large language model?"
tokenizer = AutoTokenizer.from_pretrained(model_name)
gen_pipeline = pipeline(
"text-generation",
model=model_name,
torch_dtype=torch.float16,
device_map="auto",
)
sequences = gen_pipeline(
f'<s>[INST] {prompt} [/INST]',
do_sample=True,
top_k=10,
num_return_sequences=1,
eos_token_id=tokenizer.eos_token_id,
max_length=200,
)
for ans in sequences:
print(f"Result: {ans['generated_text']}")