Downloads · 30 days
385
3% of all-time downloads
LemiSt/SmolLM-135M-de
SmolLM-135M-de is a text generation model from LemiSt. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
A german version of HuggingFaceTB/SmolLM-135M, trained to speak German by applying CPT for about 6 billion tokens.
Downloads · 30 days
385
3% of all-time downloads
All-time downloads
12.9K
Public
Parameters
135M
538 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors538 MB · 99%
From the Hugging Face model README
A german version of HuggingFaceTB/SmolLM-135M, trained to speak German by applying CPT for about 6 billion tokens.
If you are looking for a chat model, try this fine tune or the corresponding adapter model.
The base model is HuggingFaceTB/SmolLM-135M, which I further trained on about 6 billion German-language tokens.
I mainly made this as a small experimentation model to quickly benchmark datasets etc. - since the model is so small, I am unsure about its usefulness for any real-world scenarios.
This is a base model without any chat fine tuning etc. and thus should not be used as-is. It outputs mostly correct German, which is what I tried to achieve.
If you are looking for a chat model, try this adapter.
This is a very small model and will output blatantly wrong information. I have not done any further filtering on the source datasets, so it is possible that the model will generate lewd or otherwise inappropriate content. Use with care.
I would strongly recommend against using this model in a production setting, at least without further fine tuning and preference optimization.
Use the code below to get started with the model.
# adapted from the original SmolLM repo
# pip install transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
checkpoint = "LemiSt/SmolLM-135M-de"
device = "cuda" # for GPU usage or "cpu" for CPU usage
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
# for multiple GPUs install accelerate and do `model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto")`
model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device)
inputs = tokenizer.encode("Rezept für einen leckeren veganen Schokokuchen:\n", return_tensors="pt").to(device)
outputs = model.generate(inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0]))
This was trained with axolotl, using full fine tuning (no LoRA etc). I used a sequence length of 2048 with an effective batch size of 512, learning rate of 0.003 with the adamw_bnb_8bit optimizer and a cosine scheduler. Due to an error I made in calculating the token count, I accidentally trained for nearly 2 epochs, with the learning rate not reaching its proper minimum.