--- language: - no - nb - nn library_name: transformers pipeline_tag: text-generation tags: - norwegian - bokmaal - nynorsk - qwen3 - in5640 - bigfamtllm --- # no-base Norwegian model trained from scratch on 26B tokens of Bokmål and Nynorsk with our own 32k tokenizer. This is the reference model of the project. | | | |---|---| | Trained from | scratch | | Norwegian tokens seen | 26.00B | | Tokenizer | Norwegian, 32k | | Parameters | 2.12B | | Context length | 4,096 | Base model only, not instruction tuned. ## Results NorEval 1.1: | Task group | Metric | 0-shot | 1-shot | |---|---|---|---| | nob_language | em_first | 0.209 | 0.230 | | nob_orthography | acc | 0.839 | 0.874 | | nob_reading | f1 | 0.192 | 0.205 | | nob_world | acc | 0.292 | 0.296 | | nno_language | em_first | 0.398 | 0.458 | | nno_world | acc | 0.297 | 0.310 | Robustness (noisy versions of three NorEval tasks): 0.369 on clean input, -0.039 on average under noise. ## Usage ```python import torch from transformers import AutoModelForCausalLM, AutoTokenizer tokenizer = AutoTokenizer.from_pretrained("BigFamTLLM/no-base") model = AutoModelForCausalLM.from_pretrained("BigFamTLLM/no-base", dtype=torch.bfloat16) inputs = tokenizer("Oslo er hovedstaden i", return_tensors="pt") output = model.generate(**inputs, max_new_tokens=30) print(tokenizer.decode(output[0])) ``` ## Training - Qwen3 architecture: 36 layers, hidden size 2176, 34 attention heads (17 KV heads), tied embeddings. - Megatron-LM on 8 GH200 GPUs on Olivia (Sigma2). Sequence length 4096, batch size 128, AdamW, peak learning rate 5e-4 with 2,000 warmup steps and no decay (1e-4 for the embedding-only stage). - Data from HPLT 4.0. The Norwegian mix is 85% Bokmål and 15% Nynorsk. - Tokenizer swap: tokens shared by both vocabularies keep their embedding, new tokens start from the mean of the old tokenizer's pieces. - Annealing: 916 steps (0.48B tokens) of high-quality Bokmål and Nynorsk, linear decay to 0. - Converted to Hugging Face format with Megatron-Bridge. The configs are adjusted so the model also loads in transformers 4.x. ## Project BigFamTLLM is a student project in IN5640 at the University of Oslo (autumn 2026). We trained Norwegian, Danish and multilingual models from scratch with the same architecture and budget, adapted the Danish and multilingual ones to Norwegian, and evaluated every checkpoint with and without annealing. All 50 models: | | As trained | Annealed | |---|---|---| | Norwegian from scratch | [no-base](https://huggingface.co/BigFamTLLM/no-base) | [no-base-anneal](https://huggingface.co/BigFamTLLM/no-base-anneal) | | Danish from scratch | [da-base](https://huggingface.co/BigFamTLLM/da-base) | [da-base-anneal](https://huggingface.co/BigFamTLLM/da-base-anneal) | | Multilingual from scratch | [ml-base](https://huggingface.co/BigFamTLLM/ml-base) | [ml-base-anneal](https://huggingface.co/BigFamTLLM/ml-base-anneal) | | Danish, embeddings only | [da-emb](https://huggingface.co/BigFamTLLM/da-emb) | [da-emb-anneal](https://huggingface.co/BigFamTLLM/da-emb-anneal) | | Danish CPT checkpoints | [1](https://huggingface.co/BigFamTLLM/da-cpt1), [2](https://huggingface.co/BigFamTLLM/da-cpt2), [3](https://huggingface.co/BigFamTLLM/da-cpt3), [4](https://huggingface.co/BigFamTLLM/da-cpt4), [5](https://huggingface.co/BigFamTLLM/da-cpt5), [6](https://huggingface.co/BigFamTLLM/da-cpt6), [7](https://huggingface.co/BigFamTLLM/da-cpt7), [8](https://huggingface.co/BigFamTLLM/da-cpt8), [9](https://huggingface.co/BigFamTLLM/da-cpt9), [10](https://huggingface.co/BigFamTLLM/da-cpt10) | [1](https://huggingface.co/BigFamTLLM/da-cpt1-anneal), [2](https://huggingface.co/BigFamTLLM/da-cpt2-anneal), [3](https://huggingface.co/BigFamTLLM/da-cpt3-anneal), [4](https://huggingface.co/BigFamTLLM/da-cpt4-anneal), [5](https://huggingface.co/BigFamTLLM/da-cpt5-anneal), [6](https://huggingface.co/BigFamTLLM/da-cpt6-anneal), [7](https://huggingface.co/BigFamTLLM/da-cpt7-anneal), [8](https://huggingface.co/BigFamTLLM/da-cpt8-anneal), [9](https://huggingface.co/BigFamTLLM/da-cpt9-anneal), [10](https://huggingface.co/BigFamTLLM/da-cpt10-anneal) | | Multilingual, embeddings only | [ml-emb](https://huggingface.co/BigFamTLLM/ml-emb) | [ml-emb-anneal](https://huggingface.co/BigFamTLLM/ml-emb-anneal) | | Multilingual CPT checkpoints | [1](https://huggingface.co/BigFamTLLM/ml-cpt1), [2](https://huggingface.co/BigFamTLLM/ml-cpt2), [3](https://huggingface.co/BigFamTLLM/ml-cpt3), [4](https://huggingface.co/BigFamTLLM/ml-cpt4), [5](https://huggingface.co/BigFamTLLM/ml-cpt5), [6](https://huggingface.co/BigFamTLLM/ml-cpt6), [7](https://huggingface.co/BigFamTLLM/ml-cpt7), [8](https://huggingface.co/BigFamTLLM/ml-cpt8), [9](https://huggingface.co/BigFamTLLM/ml-cpt9), [10](https://huggingface.co/BigFamTLLM/ml-cpt10) | [1](https://huggingface.co/BigFamTLLM/ml-cpt1-anneal), [2](https://huggingface.co/BigFamTLLM/ml-cpt2-anneal), [3](https://huggingface.co/BigFamTLLM/ml-cpt3-anneal), [4](https://huggingface.co/BigFamTLLM/ml-cpt4-anneal), [5](https://huggingface.co/BigFamTLLM/ml-cpt5-anneal), [6](https://huggingface.co/BigFamTLLM/ml-cpt6-anneal), [7](https://huggingface.co/BigFamTLLM/ml-cpt7-anneal), [8](https://huggingface.co/BigFamTLLM/ml-cpt8-anneal), [9](https://huggingface.co/BigFamTLLM/ml-cpt9-anneal), [10](https://huggingface.co/BigFamTLLM/ml-cpt10-anneal) | These are research models trained on web text. They can produce wrong or offensive output and are not meant for production use.