Downloads · 30 days
10
2% of all-time downloads
Sentdex/Walls1337bot-Llama2-7B-003.005.5000
Walls1337bot-Llama2-7B-003.005.5000 is a text generation model from Sentdex. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
Probably don't use this model, I'm just tinkering, but it's a multi-turn, multi-speaker model attempt trained from /r/wallstreetbets data that you can find: https://huggingface.co/datasets/Sentdex/WSB-003.005
Downloads · 30 days
10
2% of all-time downloads
All-time downloads
598
Public
Repo size
134 MB
Likes
2
Public
Click a slice to open those files.
.safetensors134 MB · 100%
From the Hugging Face model README
Probably don't use this model, I'm just tinkering, but it's a multi-turn, multi-speaker model attempt trained from /r/wallstreetbets data that you can find: https://huggingface.co/datasets/Sentdex/WSB-003.005
#https://huggingface.co/docs/peft/quicktour
from peft import AutoPeftModelForCausalLM
from transformers import AutoTokenizer
import torch
model = AutoPeftModelForCausalLM.from_pretrained("Sentdex/Walls1337bot-Llama2-7B-003.005.5000")
tokenizer = AutoTokenizer.from_pretrained("NousResearch/Llama-2-7b-chat-hf")
model = model.to("cuda")
model.eval()
prompt = "Your text here."
formatted_prompt = f"### BEGIN CONVERSATION ###\n\n## Speaker_0: ##\n{prompt}\n\n## Walls1337bot: ##\n"
inputs = tokenizer(formatted_prompt, return_tensors="pt")
outputs = model.generate(input_ids=inputs["input_ids"].to("cuda"), max_new_tokens=128)
print(tokenizer.batch_decode(outputs.detach().cpu().numpy(), skip_special_tokens=True)[0])