Downloads · 30 days
5
11% of all-time downloads
VijayShinde1996/vrs-LAMA2_7b_chat_hf
vrs-LAMA2_7b_chat_hf is a text generation model from VijayShinde1996. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
<center<img src="https://i.imgur.com/C2x7n2a.png" width="300"</center
Downloads · 30 days
5
11% of all-time downloads
All-time downloads
46
Public
Repo size
13.5 GB
Likes
0
Public
Click a slice to open those files.
.bin13.5 GB · 100%
From the Hugging Face model README
This is a llama-2-7b-chat-hf model fine-tuned using LoRA (4-bit precision)
It was trained on a Google Colab notebook with a T4 GPU and high RAM.
!huggingface-cli login
!pip install transformers accelerate
from transformers import AutoTokenizer
import transformers
import torch
model = "VijayShinde1996/vrs-LAMA2_7b_chat_hf"
prompt = "Who is chhatrapati shivaji maharaj?"
tokenizer = AutoTokenizer.from_pretrained(model)
pipeline = transformers.pipeline(
"text-generation",
model=model,
torch_dtype=torch.float16,
device_map="auto",
)
sequences = 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 seq in sequences:
print(f"Result: {seq['generated_text']}")