Abhishek0323's Fine-tuned LLaMA-2 Model
Model Description
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.
How to Use
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']}")
- Downloads last month
- 18
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.