Instructions to use NbAiLab/borealis2-26b-a4b-preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NbAiLab/borealis2-26b-a4b-preview with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="NbAiLab/borealis2-26b-a4b-preview") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("NbAiLab/borealis2-26b-a4b-preview") model = AutoModelForMultimodalLM.from_pretrained("NbAiLab/borealis2-26b-a4b-preview", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NbAiLab/borealis2-26b-a4b-preview with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NbAiLab/borealis2-26b-a4b-preview" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NbAiLab/borealis2-26b-a4b-preview", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/NbAiLab/borealis2-26b-a4b-preview
- SGLang
How to use NbAiLab/borealis2-26b-a4b-preview 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 "NbAiLab/borealis2-26b-a4b-preview" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NbAiLab/borealis2-26b-a4b-preview", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "NbAiLab/borealis2-26b-a4b-preview" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NbAiLab/borealis2-26b-a4b-preview", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use NbAiLab/borealis2-26b-a4b-preview with Docker Model Runner:
docker model run hf.co/NbAiLab/borealis2-26b-a4b-preview
Borealis 2 26B-A4B (Preview)
Release: August 21st, 2026.
Model summary
NbAiLab/borealis2-26b-a4b-preview is a 26B-parameter (4B active) instruction-tuned preview model intended for early testing and feedback. It is an experiment and should be treated as pre-release quality.
The model starts from google/gemma-4-26B-A4B-it, continued pre-trained on Aurora 2604 data, and then supervised fine-tuned for two epochs on textual instructions from NbAiLab/aurora-sft-2606. SFT loss is calculated on assistant responses only.
Training data
Continuous pre-training uses aurora, a mix of sources both internal and external, including license materials under agreements. Supervised fine-tuning (SFT) uses NbAiLab/aurora-sft-2606. Examples use the Gemma 4 chat template; user and system tokens are masked from the training loss.
The aurora dataset finished building in April 2026 and contained a total of 47B whitespace-separated words with a knowledge cutoff of January 1st 2025.
Sources
Word counts
| Source\Language | Total | nob | nno | dan | swe | eng | fao | isl | sme | non | fin | smn | sma | smj | sms | fkv | sju | other |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Total | 47,588,939,435 | 24,310,675,244 | 11,121,117,598 | 4,635,647,954 | 2,466,930,277 | 2,418,581,785 | 1,534,499,832 | 618,403,302 | 136,625,254 | 130,821,960 | 115,529,546 | 26,099,190 | 25,054,850 | 19,392,470 | 11,725,220 | 10,308,610 | 42,900 | 7,483,443 |
| hplt-3.0 | 15,020,676,845 | 7,387,980,881 | 1,650,457,860 | 3,406,653,847 | 1,945,721,769 | 241 | 386,912,020 | 161,832,408 | 509,882 | 39,453,060 | 37,167,967 | 633,100 | 46,480 | 152,950 | 15,170 | 3,139,210 | - | - |
| fineweb-2 | 14,616,279,115 | 9,586,371,459 | 3,739,975,210 | - | - | 91 | 814,239,570 | 273,740,521 | 52,936,570 | 47,996,140 | 62,367,474 | 11,890,230 | 9,333,600 | 5,615,090 | 6,946,090 | 4,826,690 | 40,380 | - |
| nb-newspapers-mbl | 6,403,459,654 | 3,222,919,898 | 3,179,351,370 | 36,981 | 12,848 | 205,425 | - | 539 | 76,101 | 1,090 | 102 | - | 551,030 | 27,710 | - | 276,560 | - | - |
| finepdfs | 5,885,083,486 | 3,031,393,119 | 1,161,632,350 | 757,427,249 | 416,681,332 | 3,914 | 280,421,310 | 181,277,900 | 16,222,925 | 13,795,380 | 15,306,017 | 2,480,840 | 1,423,800 | 4,614,610 | 2,057,710 | 345,030 | - | - |
| maalfrid-crawl | 994,747,286 | 492,399,964 | 482,117,030 | 565,919 | 39,357 | 9,450,493 | - | - | 5,264,213 | 188,860 | - | - | 2,787,440 | 1,902,390 | - | 31,620 | - | - |
| swallow-code-v2 | 848,043,875 | 42,982 | 12,429 | 16,500,328 | 429,047 | 827,993,226 | 2,432 | 10,507 | 424 | - | 76,313 | - | - | - | - | - | - | 2,976,187 |
| nb-books-ocr | 817,147,445 | 220,740,790 | 459,992,080 | 96,760,244 | 448,854 | 1,267,865 | 601,140 | - | 7,256,662 | 29,052,580 | - | - | 714,070 | 313,160 | - | - | - | - |
| megamath | 795,092,965 | 3,201 | 6,419 | 858,060 | 201,115 | 789,418,493 | - | - | 12,292 | - | 86,129 | - | - | - | - | - | - | 4,507,256 |
| fineweb-2-hq | 439,744,102 | 66 | - | 344,871,624 | 94,872,412 | - | - | - | - | - | - | - | - | - | - | - | - | - |
| finewiki | 425,260,298 | 83,273,602 | 210,355,610 | 11,313,266 | 8,520,965 | 97,669,581 | 8,341,750 | 1,526,141 | 206,149 | 45,590 | 525,544 | 3,482,100 | - | - | - | - | - | - |
| maalfrid-government | 382,884,652 | 175,367,608 | 204,521,790 | 158,061 | 1,319 | 602,180 | - | 1,486 | 1,204,748 | - | - | - | 453,730 | 236,870 | - | 336,860 | - | - |
| fineweb-edu | 358,894,808 | - | - | - | - | 358,807,998 | - | - | - | 86,810 | - | - | - | - | - | - | - | - |
| fineweb-hq | 290,431,291 | 1,036 | - | - | 228 | 290,244,437 | - | - | - | 185,590 | - | - | - | - | - | - | - | - |
| giellalt | 112,384,962 | 3,616,964 | 2,479,390 | 20,829 | 1,031 | - | 43,981,610 | 13,800 | 34,305,758 | 16,860 | - | 7,612,920 | 9,744,700 | 6,529,690 | 2,706,250 | 1,352,640 | 2,520 | - |
| parlamint | 69,692,697 | 69,256,627 | 436,070 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
| kudos | 59,909,727 | 31,938,952 | 27,698,540 | - | - | 191,476 | - | - | 80,759 | - | - | - | - | - | - | - | - | - |
| project-gutenberg | 42,718,920 | - | - | - | - | 42,718,920 | - | - | - | - | - | - | - | - | - | - | - | - |
| saami-web | 18,548,893 | - | - | - | - | 122 | - | - | 18,548,771 | - | - | - | - | - | - | - | - | - |
| lovdata | 5,748,677 | 3,702,797 | 2,045,880 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
| patents | 1,132,943 | 1,132,671 | - | 272 | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
| nb-digimanus | 1,056,794 | 532,627 | 35,570 | 481,274 | - | 7,323 | - | - | - | - | - | - | - | - | - | - | - | - |
Before upsampling
| Source\Language | Total | nob | dan | swe | eng | nno | isl | fao | fin | sme | non | smn | sma | smj | sms | fkv | sju | other |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Total | 35,903,335,353 | 24,310,675,244 | 4,635,647,954 | 2,466,930,277 | 2,418,581,785 | 1,112,128,723 | 618,403,302 | 153,452,172 | 115,529,546 | 42,158,387 | 13,082,196 | 2,609,919 | 2,505,485 | 1,939,247 | 1,172,522 | 1,030,861 | 4,290 | 7,483,443 |
| hplt-3.0 | 13,147,596,474 | 7,387,980,881 | 3,406,653,847 | 1,945,721,769 | 241 | 165,045,786 | 161,832,408 | 38,691,202 | 37,167,967 | 158,376 | 3,945,306 | 63,310 | 4,648 | 15,295 | 1,517 | 313,921 | - | - |
| fineweb-2 | 10,402,853,593 | 9,586,371,459 | - | - | 91 | 373,997,521 | 273,740,521 | 81,423,957 | 62,367,474 | 16,287,748 | 4,799,614 | 1,189,023 | 933,360 | 561,509 | 694,609 | 482,669 | 4,038 | - |
| finepdfs | 4,553,779,407 | 3,031,393,119 | 757,427,249 | 416,681,332 | 3,914 | 116,163,235 | 181,277,900 | 28,042,131 | 15,306,017 | 5,012,773 | 1,379,538 | 248,084 | 142,380 | 461,461 | 205,771 | 34,503 | - | - |
| nb-newspapers-mbl | 3,541,220,733 | 3,222,919,898 | 36,981 | 12,848 | 205,425 | 317,935,137 | 539 | - | 102 | 24,164 | 109 | - | 55,103 | 2,771 | - | 27,656 | - | - |
| swallow-code-v2 | 848,043,875 | 42,982 | 16,500,328 | 429,047 | 827,993,226 | 12,429 | 10,507 | 2,432 | 76,313 | 424 | - | - | - | - | - | - | - | 2,976,187 |
| megamath | 795,092,965 | 3,201 | 858,060 | 201,115 | 789,418,493 | 6,419 | - | - | 86,129 | 12,292 | - | - | - | - | - | - | - | 4,507,256 |
| maalfrid-crawl | 552,781,457 | 492,399,964 | 565,919 | 39,357 | 9,450,493 | 48,211,703 | - | - | - | 1,622,990 | 18,886 | - | 278,744 | 190,239 | - | 3,162 | - | - |
| fineweb-2-hq | 439,744,102 | 66 | 344,871,624 | 94,872,412 | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
| nb-books-ocr | 370,533,410 | 220,740,790 | 96,760,244 | 448,854 | 1,267,865 | 45,999,208 | - | 60,114 | - | 2,248,354 | 2,905,258 | - | 71,407 | 31,316 | - | - | - | - |
| fineweb-edu | 358,816,679 | - | - | - | 358,807,998 | - | - | - | - | - | 8,681 | - | - | - | - | - | - | - |
| fineweb-hq | 290,264,260 | 1,036 | - | 228 | 290,244,437 | - | - | - | - | - | 18,559 | - | - | - | - | - | - | - |
| finewiki | 225,114,542 | 83,273,602 | 11,313,266 | 8,520,965 | 97,669,581 | 21,035,561 | 1,526,141 | 834,175 | 525,544 | 62,938 | 4,559 | 348,210 | - | - | - | - | - | - |
| maalfrid-government | 197,068,531 | 175,367,608 | 158,061 | 1,319 | 602,180 | 20,452,179 | 1,486 | - | - | 382,952 | - | - | 45,373 | 23,687 | - | 33,686 | - | - |
| parlamint | 69,300,234 | 69,256,627 | - | - | - | 43,607 | - | - | - | - | - | - | - | - | - | - | - | - |
| project-gutenberg | 42,718,920 | - | - | - | 42,718,920 | - | - | - | - | - | - | - | - | - | - | - | - | - |
| kudos | 34,922,645 | 31,938,952 | - | - | 191,476 | 2,769,854 | - | - | - | 22,363 | - | - | - | - | - | - | - | - |
| giellalt | 21,681,541 | 3,616,964 | 20,829 | 1,031 | - | 247,939 | 13,800 | 4,398,161 | - | 10,586,259 | 1,686 | 761,292 | 974,470 | 652,969 | 270,625 | 135,264 | 252 | - |
| saami-web | 5,736,876 | - | - | - | 122 | - | - | - | - | 5,736,754 | - | - | - | - | - | - | - | - |
| lovdata | 3,907,385 | 3,702,797 | - | - | - | 204,588 | - | - | - | - | - | - | - | - | - | - | - | - |
| patents | 1,132,943 | 1,132,671 | 272 | - | - | - | - | - | - | - | - | - | - | - | - | - | - | - |
| nb-digimanus | 1,024,781 | 532,627 | 481,274 | - | 7,323 | 3,557 | - | - | - | - | - | - | - | - | - | - | - | - |
⚠️ Safety / alignment disclaimer (important)
This is a preview experiment and has not been completely safety-aligned. The model may produce harmful, biased, or insensitive content, including content that is offensive, unsafe, or inappropriate. Do not use it for safety-critical or high-stakes applications, and add your own safety mitigations if deploying.
Intended use
- Norwegian-centric assistant-style tasks, including drafting, summarization, Q&A, and light reasoning.
- Assessment of Norwegian writing style and quality.
- Early evaluation of behaviour, language coverage (Norwegian, Bokmål, Nynorsk, and English), and quality.
Limitations
- Preview quality; outputs may be unstable and may hallucinate.
- Not safety-aligned; the model may follow harmful instructions or generate problematic content.
- This release is an early SFT checkpoint, not a final production model.
Weights & formats
Transformers (original)
- NbAiLab/borealis2-26b-a4b-preview (safetensors).
License
The license of this model is an adaptation of the Apache 2.0 license with additional use-based restrictions. In particular, users of the model are required to refrain from intentionally using the model to recreate data the model has been trained on. The license also requires users not to use the model or its output to provide end-user services whose primary purpose is to give access to licensed press publications in the training data.
For more information, see the LICENSE and the License FAQ.
Acknowledgements
Thanks to the Gemma team at Google and to everyone contributing feedback on this preview.
Disclaimer
These models may have bias and/or any other undesirable distortions. When third parties, deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their use and, in any event, to comply with applicable regulations, including regulations regarding the use of artificial intelligence. In no event shall the owner of the models (The National Library of Norway) be liable for any results arising from the use made by third parties of these models.
Contact
For feedback, technical concerns, or collaboration inquiries, please contact ailab@nb.no.
- Downloads last month
- -