Downloads · 30 days
12
2% of all-time downloads
LSX-UniWue/Betzerl_1B_wiki_preview
Betzerl_1B_wiki_preview is a text generation model from LSX-UniWue. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as other.
This is a Bavarian adapter for the German Tinyllama 1B language model which was tuned on a dump of the Bavarian wikipedia, without further optimization. Please don't take it too seriously ;) Find more details on our p…
Downloads · 30 days
12
2% of all-time downloads
All-time downloads
604
Public
Repo size
271 MB
Likes
0
Public
Click a slice to open those files.
.safetensors271 MB · 99%
From the Hugging Face model README
This is a Bavarian adapter for the German Tinyllama 1B language model which was tuned on a dump of the Bavarian wikipedia, without further optimization. Please don't take it too seriously ;) Find more details on our page and our preprint!
import torch
from peft import PeftConfig, PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
# script config
base_model_name = "LSX-UniWue/LLaMmlein_1B"
adapter_name = "LSX-UniWue/Betzerl_1B_wiki_preview"
device = "cuda" # or mps
# load model
config = PeftConfig.from_pretrained(adapter_name)
base_model = model = AutoModelForCausalLM.from_pretrained(
base_model_name,
torch_dtype=torch.bfloat16,
device_map=device,
)
base_model.resize_token_embeddings(32001)
model = PeftModel.from_pretrained(base_model, adapter_name)
tokenizer = AutoTokenizer.from_pretrained(adapter_name)