Run this model with HF Jobs

Run LRZ-ai/Llama-GENBA-10B-base on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/LRZ-ai/Llama-GENBA-10B-base. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/LRZ-ai/Llama-GENBA-10B-base on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/LRZ-ai/Llama-GENBA-10B-base. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/LRZ-ai/Llama-GENBA-10B-base. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

Llama-GENBA-10B-base

Llama-GENBA-10B-base is a pretrained language model for German, Bavarian, and English. We expanded Llama 3.1-8B with eight additional Transformer blocks and continued pretraining on German, English, and Bavarian data. The resulting model has 40 layers and approximately 10 billion parameters.

This is a base completion model. It was not instruction-tuned and does not use a chat template. For instruction-following applications, use Llama-GENBA-10B-IT.

Model details

Property Value
Model type Decoder-only causal language model
Learned parameters 9,984,847,872
Transformer layers 40
Hidden size 4,096
Feed-forward size 14,336
Attention heads 32
Key-value heads 8
Vocabulary size 153,853
Context length 8,192 tokens
Positional encoding RoPE with Llama-3 scaling

Training

We first trained the added blocks on a balanced German and English mixture. We then continued pretraining with approximately 45% German, 45% English, and 10% Bavarian sampling. The released base model corresponds to checkpoint 41,707.

The training data included Knowledge Pile, Cosmopedia, UltraTextbooks-2.0, Proof-Pile-2, occiglot-fineweb-v1.0, Bavarian Wikipedia material, OPUS data, and Bavarian text identified in FineWeb.

We trained the model on a Cerebras CS-2 system using Cerebras Model Zoo 2.5.0, Cerebras PyTorch 2.5.0, Transformers 4.45.2, tokenizers 0.20.1, and Python 3.8.8.

How to use

The tokenizer contains custom decoding code for the extended German and Bavarian vocabulary. Review tokenization_genba.py before enabling trust_remote_code=True.

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "path/to/Llama-GENBA-10B-base"

tokenizer = AutoTokenizer.from_pretrained(
    model_id,
    use_fast=True,
    trust_remote_code=True,
)
model = AutoModelForCausalLM.from_pretrained(
    model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)

prompt = "München ist die Hauptstadt Bayerns und"
inputs = tokenizer(prompt, return_tensors="pt", return_attention_mask=True)
inputs = {name: value.to(model.device) for name, value in inputs.items()}

with torch.inference_mode():
    output = model.generate(
        **inputs,
        max_new_tokens=80,
        do_sample=False,
        eos_token_id=128001,
        pad_token_id=128001,
    )

new_tokens = output[0, inputs["input_ids"].shape[1]:]
print(tokenizer.decode(new_tokens, skip_special_tokens=True))

The model uses <|begin_of_text|> as BOS and <|end_of_text|> as EOS. ID 128009 (<|eot_id|>) is reserved for chat turns and is not the base-model completion stop token.

Tokenizer and Unicode handling

The extended vocabulary improves German and Bavarian tokenization, including text with umlauts and ß. GenbaTokenizerFast decodes the added Unicode tokens without changing their IDs or the input tokenization learned during training.

Load the tokenizer through AutoTokenizer with trust_remote_code=True. Loading tokenizer.json directly with the Rust tokenizers library bypasses the custom decoder.

Limitations

Llama-GENBA-10B-base can produce incorrect facts, continue a prompt in an unexpected language, or generate repetitive text. It is a pretrained completion model rather than a conversational assistant. Bavarian spelling and vocabulary vary across regions, and outputs may mix Bavarian with Standard German.

Verify important claims before using generated text. Do not use the model for autonomous or high-stakes decisions.

Citation

@article{hoffmann2025llamagenba10b,
  title         = {Llama-GENBA-10B: A Trilingual Large Language Model for German, English and Bavarian},
  author        = {Hoffmann, Michael and John, Jophin and Schweter, Stefan and Ramakrishnan, Gokul and Mak, Hoi-Fong and Zhang, Alice and Gaynullin, Dmitry and Hammer, Nicolay J.},
  year          = {2025},
  eprint        = {2509.05668},
  archivePrefix = {arXiv},
  primaryClass  = {cs.CL},
  url           = {https://arxiv.org/abs/2509.05668}
}

License

Llama-Genba-10B is a derivative of Meta Llama 3.1 and is released under the following terms:

Built with Llama

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for LRZ-ai/Llama-GENBA-10B-base