Instructions to use LSX-UniWue/LLaMmlein_1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LSX-UniWue/LLaMmlein_1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LSX-UniWue/LLaMmlein_1B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("LSX-UniWue/LLaMmlein_1B") model = AutoModelForCausalLM.from_pretrained("LSX-UniWue/LLaMmlein_1B") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use LSX-UniWue/LLaMmlein_1B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LSX-UniWue/LLaMmlein_1B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LSX-UniWue/LLaMmlein_1B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LSX-UniWue/LLaMmlein_1B
- SGLang
How to use LSX-UniWue/LLaMmlein_1B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "LSX-UniWue/LLaMmlein_1B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LSX-UniWue/LLaMmlein_1B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "LSX-UniWue/LLaMmlein_1B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LSX-UniWue/LLaMmlein_1B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LSX-UniWue/LLaMmlein_1B with Docker Model Runner:
docker model run hf.co/LSX-UniWue/LLaMmlein_1B
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("LSX-UniWue/LLaMmlein_1B")
model = AutoModelForCausalLM.from_pretrained("LSX-UniWue/LLaMmlein_1B")LLäMmlein 1B
LLäMmlein 1B is a German LLaMa model trained from scratch using our adapted Tinyllama codebase on the German portion of RedPajama V2. To enhance data quality, we additionally deduplicated the dataset on paragraph level and filtered it using a token-to-word ratio filter. The resulting dataset can be found here.
We provide three model sizes:
LLäMmlein 1B ← You are here
Find more details on our page our page and our preprint!
Usage
You can use LLäMmlein with the transformers library.
(Optional: install flash-attn to achieve highest efficiency.)
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "LSX-UniWue/LLaMmlein_1B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)
Intermediate Checkpoints
In addition to the final model checkpoint, we publish intermediate checkpoints throughout the full training process as unique branches in this repository. A specific checkpoint can be loaded like this:
from transformers import AutoTokenizer, AutoModelForCausalLM
model_id = "LSX-UniWue/LLaMmlein_1B"
revision = "iter-00420000-ckpt"
tokenizer = AutoTokenizer.from_pretrained(model_id, revision=revision)
model = AutoModelForCausalLM.from_pretrained(model_id, revision=revision)
Next to the model itself each branch contains all datapoints that were used to train the model up to that point.
In the correspinding folder, named after the checkpoint, you can find several .log files (depending on the number of GPUs) of the following format:
{"time": 1739809392.679516,
"iter_num": 0,
"data_id": ["sha1:EDQMBYDCYBLDAZH3MGYM276BM2DEHPPJ", "sha1:SAJCI75DRHZZFGQORV66NB5FVWUAVLFH", "sha1:7RBZV2MCEM4TUGBBWGTFQAKTWUOGETZU", "sha1:234M32IMLZF7455AKOFWDP6HT6YXAYB4", "sha1:2BIZ7LLSHRK5GUGPZM2GM55APTDKBUG2", "sha1:OF7OI77ZT7ROXGMB6LL4RSRANX7REAYK", "sha1:LGPUOCOV3MKETI5F3IHVGZPD4M26NNJL", "sha1:SHIHUW7FJTP5YHFFV2JZ2CAHUVMKK7XG"],
"file_id": [0, 0, 0, 0, 0, 0, 0, 0],
"process_rank": 0}
Note: Our earlier models from the paper, which do not include data logging, are available at:
License
We release the LLäMmlein models under a research-only RAIL-M license. See license.md for details. Data Take Down
- Downloads last month
- 5,846
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LSX-UniWue/LLaMmlein_1B")