Downloads · 30 days
4
17% of all-time downloads
kalhosni/llama2finetune-v1
llama2finetune-v1 is a text generation model from kalhosni. Use it when you need the model to write or continue text. It is set up for adapter-transformers. The card lists the license as apache-2.0.
Downloads · 30 days
4
17% of all-time downloads
All-time downloads
23
Public
Repo size
101 MB
Likes
0
Public
Click a slice to open those files.
.pt67.2 MB · 48%
From the Hugging Face model README
Code for Training:
from transformers import AutoTokenizer import transformers import torch
model = "meta-llama/Llama-2-7b-chat-hf"
tokenizer = AutoTokenizer.from_pretrained(model) pipeline = transformers.pipeline( "text-generation", model=model, torch_dtype=torch.float16, device_map="auto", )
sequences = pipeline( 'I liked "Breaking Bad" and "Band of Brothers". Do you have any recommendations of other shows I might like?\n', 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']}")