Image-Text-to-Text
Transformers
Safetensors
Norwegian
Norwegian Bokmål
Norwegian Nynorsk
gemma3
conversational
instruct
borealis
norwegian
norwegian-bokmal
norwegian-nynorsk
full-release
text-generation-inference
🇪🇺 Region: EU
Run this model with HF Jobs
Run NbAiLab/borealis-12b 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/NbAiLab/borealis-12b. 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/NbAiLab/borealis-12b 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/NbAiLab/borealis-12b. 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/NbAiLab/borealis-12b. 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.
Instructions to use NbAiLab/borealis-12b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NbAiLab/borealis-12b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="NbAiLab/borealis-12b") 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)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("NbAiLab/borealis-12b") model = AutoModelForMultimodalLM.from_pretrained("NbAiLab/borealis-12b", 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=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NbAiLab/borealis-12b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NbAiLab/borealis-12b" # 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/borealis-12b", "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/borealis-12b
- SGLang
How to use NbAiLab/borealis-12b 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/borealis-12b" \ --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/borealis-12b", "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/borealis-12b" \ --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/borealis-12b", "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/borealis-12b with Docker Model Runner:
docker model run hf.co/NbAiLab/borealis-12b
Commit ·
2c6268a
0
Parent(s):
Squash Borealis release history
Browse filesFiles changed (22)
- .gitattributesAdded+40
- LICENSEAdded+180
- LICENSE_FAQ.pdfAdded+3
- Model_Documentation_Form.pdfAdded+3
- README.mdAdded+253
- borealis.pngAdded
- borealis_evals_202605.pngAdded
- chat_template.jinjaAdded+47
- config.jsonAdded+122
- generation_config.jsonAdded+14
- model.safetensorsAdded+3
- preprocessor_config.jsonAdded+29
- processor_config.jsonAdded+4
- signing/SHA256SUMSAdded+10
- signing/SHA256SUMS.sigAdded
- signing/ca-chain.pemAdded+72
- signing/cert.pemAdded+39
- signing/verify.shAdded+98
- special_tokens_map.jsonAdded+33
- tokenizer.jsonAdded+3
- tokenizer.modelAdded+3
- tokenizer_config.jsonAdded+27
12345678910111213141516171819202122232425262728293031323334353637383940*.7z filter=lfs diff=lfs merge=lfs -text*.arrow filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.bz2 filter=lfs diff=lfs merge=lfs -text*.ckpt filter=lfs diff=lfs merge=lfs -text*.ftz filter=lfs diff=lfs merge=lfs -text*.gz filter=lfs diff=lfs merge=lfs -text*.h5 filter=lfs diff=lfs merge=lfs -text*.joblib filter=lfs diff=lfs merge=lfs -text*.lfs.* filter=lfs diff=lfs merge=lfs -text*.mlmodel filter=lfs diff=lfs merge=lfs -text*.model filter=lfs diff=lfs merge=lfs -text*.msgpack filter=lfs diff=lfs merge=lfs -text*.npy filter=lfs diff=lfs merge=lfs -text*.npz filter=lfs diff=lfs merge=lfs -text*.onnx filter=lfs diff=lfs merge=lfs -text*.ot filter=lfs diff=lfs merge=lfs -text*.parquet filter=lfs diff=lfs merge=lfs -text*.pb filter=lfs diff=lfs merge=lfs -text*.pickle filter=lfs diff=lfs merge=lfs -text*.pkl filter=lfs diff=lfs merge=lfs -text*.pt filter=lfs diff=lfs merge=lfs -text*.pth filter=lfs diff=lfs merge=lfs -text*.rar filter=lfs diff=lfs merge=lfs -text*.safetensors filter=lfs diff=lfs merge=lfs -textsaved_model/**/* filter=lfs diff=lfs merge=lfs -text*.tar.* filter=lfs diff=lfs merge=lfs -text*.tar filter=lfs diff=lfs merge=lfs -text*.tflite filter=lfs diff=lfs merge=lfs -text*.tgz filter=lfs diff=lfs merge=lfs -text*.wasm filter=lfs diff=lfs merge=lfs -text*.xz filter=lfs diff=lfs merge=lfs -text*.zip filter=lfs diff=lfs merge=lfs -text*.zst filter=lfs diff=lfs merge=lfs -text*tfevents* filter=lfs diff=lfs merge=lfs -texttokenizer.json filter=lfs diff=lfs merge=lfs -textLICENSE_FAQ.pdf filter=lfs diff=lfs merge=lfs -textborealis.png filter=lfs diff=lfs merge=lfs -textModel_Documentation_Form.pdf filter=lfs diff=lfs merge=lfs -textborealis_evals_202605.png filter=lfs diff=lfs merge=lfs -text123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180 NB-License Version 1.0, June 2026 https://ai.nb.no/license/
This license (henceforth: NB-license) establishes terms and conditions for useof Borealis models with the following copyright notice: Borealis Copyright 2026Nasjonalbiblioteket.
This model is a fine-tuned derivative of Gemma 3, licensed under the Gemma Termsof Use. The original model is available from Google athttps://deepmind.google/models/gemma/gemma-3/. Modifications, fine-tuning, andsubsequent derivative works are distributed under the NB-license. The originalGemma Terms of Use notices, disclaimers, attribution, and use restrictionsremain fully intact and are provided at https://ai.google.dev/gemma/terms. Theadditional usage restrictions apply only to our derivative work.
1. Definitions.
- "License" means the terms and conditions for use, reproduction, andDistribution as defined in this document.
- "Licensor" means the copyright owner or entity authorized by the copyrightowner that is granting the License, including the persons or entities that mayhave rights in the Model and/or distributing the Model.
- "You" (or "Your") means an individual or Legal Entity exercising permissionsgranted by this License and/or making use of the Model for whichever purpose andin any field of use, including usage of the Model in an end-use application -e.g. chatbot, translator, image generator.
- "Third Parties" means individuals or legal entities that are not under commoncontrol with Licensor or You.
- "Data" means a collection of information and/or content extracted from thedataset used with the Model, including to train, pretrain, or otherwise evaluatethe Model. The Data is not licensed under this License.
- "Output" means the results of operating a Model as embodied in informationalcontent resulting therefrom.
- "Model" means any accompanying machine-learning based assemblies (includingcheckpoints), consisting of learnt weights, parameters (including optimizerstates), corresponding to the model architecture as embodied in theComplementary Material, that have been trained or tuned, in whole or in part onthe Data, using the Complementary Material.
- "Derivatives of the Model" means all modifications to the Model, works basedon the Model, or any other model which is created or initialized by transfer ofpatterns of the weights, parameters, activations or output of the Model, to theother model, in order to cause the other model to perform similarly to theModel, including - but not limited to - distillation methods entailing the useof intermediate data representations or methods based on the generation ofsynthetic data by the Model for training the other model.
- "Complementary Material" means the accompanying source code and scripts usedto define, run, load, benchmark or evaluate the Model, and used to prepare datafor training or evaluation, if any. This includes any accompanyingdocumentation, tutorials, examples, etc, if any.
- "Distribution" means any transmission, reproduction, publication or othersharing of the Model or Derivatives of the Model to a third party, includingproviding the Model as a hosted service made available by electronic or otherremote means - e.g. API-based or web access.
- “Use” includes accessing and utilizing a Model or Derivates of a Model, whichmay also include creating content, fine-tuning, updating, running, training,evaluating and/or re-parametrizing such Model or Derivates of a Model.
- "Contribution" means any work of authorship, including the original version ofthe Model and any modifications or additions to that Model or Derivatives of theModel thereof, that is intentionally submitted to Licensor for inclusion in theModel.
- "Contributor" means Licensor and any individual or Legal Entity on behalf ofwhom a Contribution has been received by Licensor and subsequently incorporatedwithin the Model.
2. Grant of License.
Subject to the terms and conditions of this License, each Contributor herebygrants to You a time-unlimited, worldwide, non-exclusive, no-charge, royalty-free license to use, make, have made, reproduce, prepare derivatives of themodel, publicly display, publicly perform, sublicense, offer to sell, sell,import and otherwise transfer or distribute the model and derivatives of themodel.
3. Redistribution
You may reproduce and distribute copies of the model or derivatives of the modelin any medium, with or without modifications, provided that You meet thefollowing conditions: (a) You must give any other recipients of the model orderivatives of the model a copy of this License; and (b) You must retain allcopyright notices in any redistribution of the model or derivatives of themodel, excluding those notices that do not pertain to any part of a derivativeof the model; and (c) You must include the use-based restrictions in section 4as a condition precedent to effect any type of legal agreement (e.g. a license)governing the use and/or distribution of the model or its Derivatives, and givesuch notice to any subsequent Third Party recipients;
4. Use-based Restrictions.
You can only use the Model in compliance with the following conditions:
(a) You must comply with applicable laws and regulations.
(b) You must not use the model to intentionally recreate material from thetraining data, whether protected by intellectual property rights or as personaldata
(c) Neither the name of the National library nor the names of creators orpublishers of training data may be used to endorse or promote products derivedfrom this model without specific prior written permission.
(d) You must not use the Model or its outputs, to provide end-user serviceswhose primary purpose is to summarize, restate, copy, or otherwise replaceservices for access to the press publications licensed as training data, unless you have a separate agreement with thecopyright holders. This includes, but is not limited to, services that provideusers with functional substitutes for access to the original press content.
5. Outputs.
Except as set forth herein, Licensor claims no rights in the Output You generatewith a model. You are accountable for the Output You generate and its subsequentuses. No use of the Output may contravene any provision as stated in thisLicense, hereunder section 4 on use-based restrictions.
6. Disclaimer of Warranty.
Unless required by applicable law or agreed to in writing, Licensor provides theWork (and each Contributor provides its Contributions) on an "AS IS" BASIS,WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied,including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You aresolely responsible for determining the appropriateness of using orredistributing the Work and assume any risks associated with Your exercise ofpermissions under this License. The Licensor makes no representations orwarranties that the Model or its Output will be free from factual inaccuracies,biases, or potential misinterpretation of the underlying training data. You aresolely responsible for ensuring that any use of the Model adheres to applicablelegal and ethical standards.
7. Limitation of Liability.
In no event and under no legal theory, whether in tort (including negligence),contract, or otherwise, unless required by applicable law (such as deliberateand grossly negligent acts) or agreed to in writing, shall any Contributor beliable to You for damages, including any direct, indirect, special, incidental,or consequential damages of any character arising as a result of this License orout of the use or inability to use the Work (including but not limited todamages for loss of goodwill, work stoppage, computer failure or malfunction, orany and all other commercial damages or losses), even if such Contributor hasbeen advised of the possibility of such damages.
8. Accepting Warranty or Additional Liability.
While redistributing the Work or Derivative Works thereof, You may choose tooffer, and charge a fee for, acceptance of support, warranty, indemnity, orother liability obligations and/or rights consistent with this License. However,in accepting such obligations, You may act only on Your own behalf and on Yoursole responsibility, not on behalf of any other Contributor, and only if Youagree to indemnify, defend, and hold each Contributor harmless for any liabilityincurred by, or claims asserted against, such Contributor by reason of youraccepting any such warranty or additional liability.
9. Term and Termination.
The term of this Agreement will commence upon your acceptance of this Agreementand will continue in full force and effect until terminated in accordance withthe terms and conditions herein. Licensor may terminate this Agreement if youare in breach of any term or condition of this Agreement. Upon termination ofthis Agreement, you shall cease use of the licensed model. Section 7 shallsurvive the termination of this Agreement. Termination of the agreement does notaffect your continued rights to use parts of the model the licensed model wasbased on (if warm trained) under its original license.
10. Governing Law and Jurisdiction.
This Agreement will be governed and construed under the laws of Norway. The OsloDistrict Court shall have exclusive jurisdiction of any dispute arising out ofthis Agreement.123version https://git-lfs.github.com/spec/v1oid sha256:b4a87118b0b0c1e2d5a06b27bb4b56517d4d62b2b74860f77b8ac2d601224840size 140945123version https://git-lfs.github.com/spec/v1oid sha256:d0be41de7da74e71c393d97639f76814f81c7b00eeff6512b8aaa6fa3af74eb2size 335592123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253---license: otherdatasets:- NbAiLab/aurora-sftlanguage:- 'no'- nb- nnbase_model:- google/gemma-3-12b-itpipeline_tag: image-text-to-textlibrary_name: transformerstags:- conversational- instruct- borealis- gemma3- norwegian- norwegian-bokmal- norwegian-nynorsk- full-release---

# Borealis 12B
## Model Summary
**NbAiLab/borealis-12b** is a **12B-parameter** instruction-tuned **full release** model in the Borealis family from the National Library of Norway (Nasjonalbiblioteket, NB).
This is the first Borealis release to incorporate data made available under the agreement between rights-holder organizations in Norway and the Norwegian government. To date, only a limited subset of the material has been used, specifically to teach the model how to generate news article titles and ingress texts. Models with the suffix `-open`, do not include any material from the agreement.
All Borealis released models are based on the **Gemma 3** family. This model is based on [google/gemma-3-12b-it](https://huggingface.co/google/gemma-3-12b-it), and fine-tuned for Norwegian-centric instruction following.
### Sizes
| Size | Full release | Open release ||---:|---|---|| 27B | [NbAiLab/borealis-27b](https://huggingface.co/NbAiLab/borealis-27b) | [NbAiLab/borealis-open-27b](https://huggingface.co/NbAiLab/borealis-open-27b) || 12B | [NbAiLab/borealis-12b](https://huggingface.co/NbAiLab/borealis-12b) | [NbAiLab/borealis-open-12b](https://huggingface.co/NbAiLab/borealis-open-12b) || 4B | [NbAiLab/borealis-4b](https://huggingface.co/NbAiLab/borealis-4b) | [NbAiLab/borealis-open-4b](https://huggingface.co/NbAiLab/borealis-open-4b) || 1B | [NbAiLab/borealis-1b](https://huggingface.co/NbAiLab/borealis-1b) | [NbAiLab/borealis-open-1b](https://huggingface.co/NbAiLab/borealis-open-1b) || 270M | [NbAiLab/borealis-270m](https://huggingface.co/NbAiLab/borealis-270m) | [NbAiLab/borealis-open-270m](https://huggingface.co/NbAiLab/borealis-open-270m) |
## Training Data
Supervised fine-tuning (SFT) uses instruction data prepared by the National Library of Norway for Norwegian-centric assistant behavior, writing, summarization, question answering, and related tasks.
The SFT dataset for this model is [NbAiLab/aurora-sft](https://huggingface.co/datasets/NbAiLab/aurora-sft). [NbAiLab/aurora-sft-open](https://huggingface.co/datasets/NbAiLab/aurora-sft-open) is the open version of the SFT dataset. The only difference between [NbAiLab/aurora-sft-open](https://huggingface.co/datasets/NbAiLab/aurora-sft-open) and [NbAiLab/aurora-sft](https://huggingface.co/datasets/NbAiLab/aurora-sft) is the addition of 10k tasks derived from copyright-protected newspapers material.
The Norwegian government has entered into an agreement, through the National Library of Norway, to access copyrighted press material via Kopinor on behalf of the Norwegian Media Businesses' Association (MBL), enabling the lawful training, development, maintenance, and public release of Norwegian language models. The agreement covers copyright-protected press publications published in Norway up to one year from the date of publication of the model, effectively creating a rolling cutoff date rather than a fixed historical cutoff. For this release, the cutoff date is January 1, 2025.
## Evaluation
<figure> <img src="./borealis_evals_202605.png" alt="Borealis evaluation results"> <figcaption>Borealis evaluation results on selected tasks (best score among {0-5}-shot).</figcaption></figure>
We evaluate Borealis with NorEval, MMLU-English, and nb-gpt-bench, our own evaluation suite, which will be published and described in an upcoming paper. Despite using only around 10k newspaper-derived tasks from the abovementioned agreement, we observe a slight performance increase in some key metrics. We hope to further increase the difference by incorporating proper pre-training on the newspaper material.
## Safety and Alignment
The Borealis family of models are aligned for safety using prompt baking and weighted merging of SFT and aligned models. The goal of this process is to balance model quality, usefulness, and safer behavior.
As with all generative models, outputs can still be incorrect, biased, harmful, or inappropriate. Do not use the model for safety-critical or high-stakes applications without additional evaluation and safeguards.
### Prompt Baking
To align the Borealis models, we employ *prompt baking*, a procedure that distills the behavior induced by a system prompt directly into the model weights using [`bakery`](https://github.com/marksverdhei/bakery). Specifically, we train a LoRA adapter to minimize the KL-divergence between two model distributions: Borealis conditioned on the system prompt, and the same base model augmented with the LoRA adapter but evaluated without the system prompt in context. This objective encourages the adapter to reproduce the behavioral effects of the prompt without requiring the prompt to be present at inference time.
To reduce degradation on downstream tasks and preserve general model utility, we merge the resulting prompt adapter into the base model using a scaling factor of `0.25`, which we found to provide the best empirical trade-off.
## Intended Use
- Norwegian-centric assistant-style tasks, including drafting, summarization, Q&A, and light reasoning (this is not a reasoning model).- Assessment and improvement of Norwegian writing style and quality.- Evaluation of behavior and language coverage for Norwegian, Bokmål, and Nynorsk.
## Usage
This repository contains the Transformers/safetensors version of the model. Theexamples below use `NbAiLab/borealis-12b` as the model id; replace it withanother Borealis repo id if needed.
### Transformers
Use the Gemma 3 multimodal interface. For text-only prompts, omit imagecontent and keep only the text item in the message content list.
```pythonimport torchfrom transformers import AutoProcessor, Gemma3ForConditionalGeneration
model_id = "NbAiLab/borealis-12b"
processor = AutoProcessor.from_pretrained(model_id)model = Gemma3ForConditionalGeneration.from_pretrained( model_id, device_map="auto", torch_dtype=torch.bfloat16,)
messages = [ { "role": "user", "content": [ {"type": "text", "text": "Forklar kort hva du ser på bildet."}, {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/cats.png"}, ], }]
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=256)new_tokens = outputs[0, inputs["input_ids"].shape[-1]:]print(processor.decode(new_tokens, skip_special_tokens=True))```
### vLLM
Serve the model with vLLM's OpenAI-compatible server:
```bashvllm serve NbAiLab/borealis-12b --served-model-name borealis-12b```
Then call the local chat completions endpoint:
```bashcurl http://localhost:8000/v1/chat/completions \ -H "Content-Type: application/json" \ -d '{ "model": "borealis-12b", "messages": [ { "role": "user", "content": "Skriv tre korte punkter om norsk språkteknologi." } ], "max_tokens": 256 }'```
Large models may require tensor parallelism or reduced memory settings dependingon the available GPU memory.
### llama.cpp
llama.cpp uses GGUF files, not the safetensors files in this repository. Whenthe planned GGUF companion repository is available, you can run it directly fromthe Hub:
```bashllama-server -hf NbAiLab/borealis-12b-gguf --port 8080```
Or download a GGUF file and run it locally:
```bashllama-cli -m borealis-12b.gguf \ -p "Skriv et kort sammendrag av hva Nasjonalbiblioteket gjør." \ -n 256```
### Ollama
Ollama also requires a GGUF model. Once the GGUF companion repository isavailable, you can run it from Hugging Face:
```bashollama run hf.co/NbAiLab/borealis-12b-gguf```
For a local GGUF file, create a minimal `Modelfile`:
```textFROM ./borealis-12b.gguf```
Then create and run the local Ollama model:
```bashollama create borealis-12b -f Modelfileollama run borealis-12b "Skriv tre korte punkter om norsk språkteknologi."```
## Limitations
- The model may hallucinate or produce incorrect information.- Safety alignment reduces but does not eliminate harmful or inappropriate outputs.- Performance outside Norwegian and English use cases has not been fully characterized.
## EU AI Act
The model is a fine-tune of Gemma 3. Using Gemma 3 27B as a conservative upper-bound reference, the original Gemma 3 27B training compute is estimated at approximately 2.1-2.3 x 10^24 FLOPs, based on the disclosed 14T training-token budget and the 27B parameter scale. The fine-tuning run used approximately 3.4 x 10^20 FLOPs, or about 0.015% of the estimated original training compute. This is substantially below the European Commission's indicative one-third threshold for treating a downstream modification as a significant modification that would make the modifier the provider of the modified General Purpose AI (GPAI) model.
On that basis, the fine-tuning activity is preliminarily assessed as not constituting a substantial modification for the purpose of becoming the provider of a new modified GPAI model under the compute-based criterion. However, the resulting model remains derived from a generative general-purpose AI model and may still be subject to downstream AI-system obligations under the EU AI Act.
For additional model-level documentation, see the [Model Documentation Form](./Model_Documentation_Form.pdf).
## 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](./LICENSE) and the [License FAQ](./LICENSE_FAQ.pdf).
## Authenticity
This model release is signed by the National Library of Norway. The signed manifest in `signing/SHA256SUMS` covers the model-runtime artifacts, including model weights, configuration, tokenizer files, and chat template.
To verify model authenticity and file integrity after downloading the repository, run:
```bashbash signing/verify.sh```
For more verification instructions, see [ai.nb.no/verify](https://ai.nb.no/verify).
## Weights
This repository contains the Transformers (safetensors) release of **NbAiLab/borealis-12b**.
Companion formats:- GGUF: [NbAiLab/borealis-12b-gguf](https://huggingface.co/NbAiLab/borealis-12b-gguf)- MLX: [NbAiLab/borealis-12b-mlx](https://huggingface.co/NbAiLab/borealis-12b-mlx)- MLX 8-bit: [NbAiLab/borealis-12b-mlx-8bits](https://huggingface.co/NbAiLab/borealis-12b-mlx-8bits)
## Citation and Contributors
The Borealis family of models is a joint effort of multiple teams at the National Library of Norway. Led by Javier de la Rosa ([@versae](https://huggingface.co/versae)), key contributors include (in alphabetical order) Rolv-Arild Braaten, Magnus Breder Birkenes, Lucas Charpentier, Pawel Cyrta, Tita Enstad, Markus Sverdvik Heiervang, Arne Martinus Lindstad, Marthe Løken Midtgaard, Marie Roald, Marie Røsok, Thea Tollersrud, and Angelina Zanardi. Olaus Ingskog Bergstrøm contributed with legal advice. And Yngvil Beyer, Svein Arne Brygfjeld, and Wilfred Østgulen helped with strategic oversight.
A tecnical report will be released soon.
## Acknowledgements
Thanks to the Gemma team at Google for releasing Gemma 3, and to everyone contributing to the Norwegian language technology ecosystem.
## Disclaimer
The models published in this repository are intended for a generalist purpose and are available to third parties. 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 <a rel="noopener nofollow" href="mailto:ailab@nb.no">ailab@nb.no</a>.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647{{ bos_token }}{%- if messages[0]['role'] == 'system' -%} {%- if messages[0]['content'] is string -%} {%- set first_user_prefix = messages[0]['content'] + '
' -%} {%- else -%} {%- set first_user_prefix = messages[0]['content'][0]['text'] + '
' -%} {%- endif -%} {%- set loop_messages = messages[1:] -%}{%- else -%} {%- set first_user_prefix = "" -%} {%- set loop_messages = messages -%}{%- endif -%}{%- for message in loop_messages -%} {%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%} {{ raise_exception("Conversation roles must alternate user/assistant/user/assistant/...") }} {%- endif -%} {%- if (message['role'] == 'assistant') -%} {%- set role = "model" -%} {%- else -%} {%- set role = message['role'] -%} {%- endif -%} {{ '<start_of_turn>' + role + '' + (first_user_prefix if loop.first else "") }} {%- if message['content'] is string -%} {{ message['content'] | trim }} {%- elif message['content'] is iterable -%} {%- for item in message['content'] -%} {%- if item['type'] == 'image' -%} {{ '<start_of_image>' }} {%- elif item['type'] == 'text' -%} {{ item['text'] | trim }} {%- endif -%} {%- endfor -%} {%- else -%} {{ raise_exception("Invalid content type") }} {%- endif -%} {{ '<end_of_turn>' }}{%- endfor -%}{%- if add_generation_prompt -%} {{'<start_of_turn>model'}}{%- endif -%}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122{ "architectures": [ "Gemma3ForConditionalGeneration" ], "boi_token_index": 255999, "bos_token_id": 2, "dtype": "bfloat16", "eoi_token_index": 256000, "eos_token_id": 106, "hidden_size": 3840, "image_token_index": 262144, "initializer_range": 0.02, "mm_tokens_per_image": 256, "model_type": "gemma3", "pad_token_id": 0, "text_config": { "_sliding_window_pattern": 6, "attention_bias": false, "attention_dropout": 0.0, "attn_logit_softcapping": null, "bos_token_id": 2, "dtype": "bfloat16", "eos_token_id": 1, "final_logit_softcapping": null, "head_dim": 256, "hidden_activation": "gelu_pytorch_tanh", "hidden_size": 3840, "initializer_range": 0.02, "intermediate_size": 15360, "layer_types": [ "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "full_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "sliding_attention", "full_attention" ], "max_position_embeddings": 131072, "model_type": "gemma3_text", "num_attention_heads": 16, "num_hidden_layers": 48, "num_key_value_heads": 8, "pad_token_id": 0, "query_pre_attn_scalar": 256, "rms_norm_eps": 1e-06, "rope_parameters": { "full_attention": { "factor": 8.0, "rope_theta": 1000000.0, "rope_type": "linear" }, "sliding_attention": { "rope_theta": 10000.0, "rope_type": "default" } }, "sliding_window": 1024, "tie_word_embeddings": true, "use_bidirectional_attention": false, "use_cache": false, "vocab_size": 262208 }, "tie_word_embeddings": true, "transformers_version": "5.8.0", "vision_config": { "attention_dropout": 0.0, "dtype": "bfloat16", "hidden_act": "gelu_pytorch_tanh", "hidden_size": 1152, "image_size": 896, "intermediate_size": 4304, "layer_norm_eps": 1e-06, "model_type": "siglip_vision_model", "num_attention_heads": 16, "num_channels": 3, "num_hidden_layers": 27, "patch_size": 14, "vision_use_head": false }}1234567891011121314{ "bos_token_id": 2, "cache_implementation": "hybrid", "do_sample": true, "eos_token_id": [ 106, 1, 106 ], "pad_token_id": 0, "top_k": 64, "top_p": 0.95, "transformers_version": "5.8.0"}123version https://git-lfs.github.com/spec/v1oid sha256:033f90ddc154f40c2b3bb8c40c1fa138d4e289f06c339a07eaedad031e2d2e14size 243747948241234567891011121314151617181920212223242526272829{ "do_convert_rgb": null, "do_normalize": true, "do_pan_and_scan": null, "do_rescale": true, "do_resize": true, "image_mean": [ 0.5, 0.5, 0.5 ], "image_processor_type": "Gemma3ImageProcessor", "image_seq_length": 256, "image_std": [ 0.5, 0.5, 0.5 ], "pan_and_scan_max_num_crops": null, "pan_and_scan_min_crop_size": null, "pan_and_scan_min_ratio_to_activate": null, "processor_class": "Gemma3Processor", "resample": 2, "rescale_factor": 0.00392156862745098, "size": { "height": 896, "width": 896 }}1234{ "image_seq_length": 256, "processor_class": "Gemma3Processor"}123456789107de1c58e208eda46e9c7f86397df37ec49883aeece39fb961e0a6b24088dd3c4 chat_template.jinja1c48ae63e482db2882962f126cebe5dd2e68fd2644c7fa45400651678bccd0e5 config.jsond658664f05444ad13f0b7f1298cea34e5b745583f0c720d74531c49549fa1fa1 generation_config.json033f90ddc154f40c2b3bb8c40c1fa138d4e289f06c339a07eaedad031e2d2e14 model.safetensorsf688d6bb20c5017601c4011de7ca656da8485b540b05013efdaf986c0fcc918d preprocessor_config.json3ffd5f11778dc73e2b69b3c00535e4121e1badf7018136263cd17b5b34fbaa53 processor_config.json2f7b0adf4fb469770bb1490e3e35df87b1dc578246c5e7e6fc76ecf33213a397 special_tokens_map.jsondaab2354f8a74e70d70b4d1f804939b68a8c9624dd06cb7858e52dd8970e9726 tokenizer.json1299c11d7cf632ef3b4e11937501358ada021bbdf7c47638d13c0ee982f2e79c tokenizer.modeld9aedd7a33a5aff2d3b8426eb18aed48e701213b0945564537ef6cd8844b9150 tokenizer_config.json123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172-----BEGIN CERTIFICATE-----MIIG1jCCBL6gAwIBAgIQSIcdqlEaPQ81vpaZKLkkvzANBgkqhkiG9w0BAQsFADB1MQswCQYDVQQGEwJHUjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBDQTEtMCsGA1UEAwwkSEFSSUNBIENvZGUgU2lnbmluZyBSU0EgUm9vdCBDQSAyMDIxMB4XDTIxMDMxOTA5MjEzNFoXDTM2MDMxNTA5MjEzM1owaDELMAkGA1UEBhMCR1IxNzA1BgNVBAoMLkhlbGxlbmljIEFjYWRlbWljIGFuZCBSZXNlYXJjaCBJbnN0aXR1dGlvbnMgQ0ExID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EB/wQEAwIBhjANBgkqhkiG9w0BAQsFAAOCAgEAK6xZi+Y5RNz7rUqI4GT/q8Py0s5wLwPlb7LE9TbWU2uHqx2LmQfIMI5Hcv2huHXWF6EWvWRzkTBXrX39BUCGk9FJlrIL1HxkE4vTIUk4u/vozD4x8a57TCrfggajjgWEnH9wzsC7RRffXWUM5FBIB0SLpC9W2sZ69mCNpDjxnYcWMLLwX3pCVSBxz8zuALESR79CueSztR0ZhLmYbeBptBVBteJQSMcf6pq3eZHd1dVTGfyuGGxp261ZKJtkmKc8x1WO0TAAz9QynmKxwyruNSLGu/B8u4O4AIn13BqX2TiaKVNhGaan9DtH/d1nlQ+OpGYsgpq3LXHm3674+GjBuw/qUKBFl7calRJvyLO2BWjaah4ONYWErHQMirT0dZ8ir7BUu7aeIvnZ69WKDcfc+JgxX576xpf0QRB104G2MV963YiFCK9wRwI3e+JK7F3y3SkSRMiKqt3SVXgXda9xaQ13cEqwH39C28dx3FjWGL1QxblyBMdne3xTYMpJGBW8QHOuK6grrG8RRDnsgkh+Ecr71j+2wLm4BpN1vZMndxcNXKWe6sFbAC0MqDVgx+JvNRs9drXnrd10I0+GskfvyC/QhXw5ljehKykCvT6Hz6j2HXUyzzjjc7HuEIG1KrGIBlEeWjpIUfM2WWLfQmZZULdYvvV2QJoSFuYOqtdsoNU=-----END CERTIFICATE-----123456789101112131415161718192021222324252627282930313233343536373839-----BEGIN CERTIFICATE-----MIIG6TCCBNGgAwIBAgIQRH6DOxTQI6Hp8NKCckMm7DANBgkqhkiG9w0BAQsFADBoMQswCQYDVQQGEwJHUjE3MDUGA1UECgwuSGVsbGVuaWMgQWNhZGVtaWMgYW5kIFJlc2VhcmNoIEluc3RpdHV0aW9ucyBDQTEgMB4GA1UEAwwXSEFSSUNBIENvZGUgU2lnbmluZyBSU0EwHhcNMjYwNTA4MDc1NjU1WhcNMjcwNTA4MDc1NjU1WjBlMQswCQYDVQQGEwJOTzENMAsGA1UEBwwET3NsbzEcMBoGA1UECgwT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ECMEMGDSsGAQQBgc8RAQEDAQIwMjAwBggrBgEFBQcCARYkaHR0cHM6Ly9yZXBvLmhhcmljYS5nci9kb2N1bWVudHMvQ1BTMBMGA1UdJQQMMAoGCCsGAQUFBwMDMEMGA1UdHwQ8MDowOKA2oDSGMmh0dHA6Ly9jcmwuaGFyaWNhLmdyL0hBUklDQS1Db2RlU2lnbmluZy1TdWItUjEuY3JsMB0GA1UdDgQWBBRkiwQILl9eSkYw+Nbx5KokmIBoUjAOBgNVHQ8BAf8EBAMCB4AwDQYJKoZIhvcNAQELBQADggIBABE2vKd3Q6JMFSxZUXr/kH88h40CsVG5mZ0Hr3tgm9iITjzY6ICVO2YPQXKn7Bt6hddsDWEVjQgYGArAxFV0rS9/Olr1YKdYOE/ANF7TGvbGCcVEqNIisEuHqoah406LW6Om+nSlIzizpiKWPcm4RSL0LQrwNj/Z31aNAbQNKu97eI3xuy6ZAU1xrRbRy5HNxbmXJGfy84wvogaGqHsWkYtbPL/uqzWJoj/yxLKl7YKiyfZ0h604HpGlv8Xq6CjgMWTmHyGgxIIX+EBd3tvPpGHdswGvGhX8HFkBjH2uWAmFdYbIDMTyqh4UzV3WLguaHWHsZ9QzFOcETXOFTwmH5NCckeGGaaPVxjuuAu9jqyenU84ka8rZ1qmFJzUNbjrWXK9pjsLxY+ePMu0UW9dnNGppsPCh9Ac7gBzHHDj3pQMZvIWNUKMmMw/a6hKV6VYnmYRJa3K0nEXObJv53vgEEF0H9WePUEcFAp9VKDeTGULWyT+b6iaWQqgXlkWz3isiaJgmYnyqct//aXOo+HP4TRmM6Azpd3/IlTal9T400rzc2OkQV89AmB9F8G7ZuHduRA/TKhKL/xFq+rQs0G2S41IgqTRX0Ss6wgNv/pBDWr+3kYgV4M7Vr6zpk7ZogqJKcXZpwnegxchSdjMn62WESKM636yJYdsZAikCs8T+sopK-----END CERTIFICATE-----1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798#!/bin/bash## Verify the integrity and authenticity of this model release.## Usage: bash signing/verify.sh## This script verifies:# 1. The signing certificate is issued by a trusted CA# 2. The SHA256SUMS manifest was signed by Nasjonalbiblioteket# 3. All file checksums match the manifest#
set -euo pipefail
RED='\033[0;31m'GREEN='\033[0;32m'NC='\033[0m'
pass() { echo -e "${GREEN}[PASS]${NC} $*"; }fail() { echo -e "${RED}[FAIL]${NC} $*" >&2; }
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"MODEL_DIR="$(dirname "$SCRIPT_DIR")"SIGNING_DIR="$SCRIPT_DIR"
cd "$MODEL_DIR"
errors=0
# Check required files existfor f in "$SIGNING_DIR/SHA256SUMS" "$SIGNING_DIR/SHA256SUMS.sig" \ "$SIGNING_DIR/cert.pem" "$SIGNING_DIR/ca-chain.pem"; do if [[ ! -f "$f" ]]; then fail "Missing file: $f" errors=$((errors + 1)) fidone
if [[ $errors -gt 0 ]]; then echo "" fail "Required signing files are missing. Cannot verify." exit 1fi
echo "=== Nasjonalbiblioteket Model Verification ==="echo ""
# Show certificate infoecho "Certificate subject:"openssl x509 -in "$SIGNING_DIR/cert.pem" -subject -noout 2>/dev/null | sed 's/^subject=/ /'echo "Certificate issuer:"openssl x509 -in "$SIGNING_DIR/cert.pem" -issuer -noout 2>/dev/null | sed 's/^issuer=/ /'echo "Certificate fingerprint (SHA-256):"openssl x509 -in "$SIGNING_DIR/cert.pem" -fingerprint -sha256 -noout 2>/dev/null | sed 's/^.*=/ /'echo ""
# 1. Verify certificate chainecho "--- Step 1: Verify certificate chain ---"if openssl verify -CAfile "$SIGNING_DIR/ca-chain.pem" "$SIGNING_DIR/cert.pem" > /dev/null 2>&1; then pass "Certificate chain is valid."else fail "Certificate chain verification failed!" errors=$((errors + 1))fi
# 2. Verify signatureecho "--- Step 2: Verify manifest signature ---"PUBKEY=$(mktemp)trap "rm -f '$PUBKEY'" EXITopenssl x509 -in "$SIGNING_DIR/cert.pem" -pubkey -noout > "$PUBKEY" 2>/dev/null
if openssl dgst -sha256 -verify "$PUBKEY" \ -signature "$SIGNING_DIR/SHA256SUMS.sig" \ "$SIGNING_DIR/SHA256SUMS" > /dev/null 2>&1; then pass "Manifest signature is valid."else fail "Manifest signature verification failed!" errors=$((errors + 1))fi
# 3. Verify file checksumsecho "--- Step 3: Verify file checksums ---"if sha256sum -c "$SIGNING_DIR/SHA256SUMS" 2>/dev/null; then pass "All file checksums match."else fail "One or more file checksums do not match!" errors=$((errors + 1))fi
# Summaryecho ""if [[ $errors -eq 0 ]]; then echo -e "${GREEN}✅ Verification successful. All files are authentic and unmodified.${NC}" exit 0else echo -e "${RED}❌ Verification failed with $errors error(s).${NC}" exit 1fi123456789101112131415161718192021222324252627282930313233{ "boi_token": "<start_of_image>", "bos_token": { "content": "<bos>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "eoi_token": "<end_of_image>", "eos_token": { "content": "<eos>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "image_token": "<image_soft_token>", "pad_token": { "content": "<pad>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "unk_token": { "content": "<unk>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}123version https://git-lfs.github.com/spec/v1oid sha256:daab2354f8a74e70d70b4d1f804939b68a8c9624dd06cb7858e52dd8970e9726size 33384567123version https://git-lfs.github.com/spec/v1oid sha256:1299c11d7cf632ef3b4e11937501358ada021bbdf7c47638d13c0ee982f2e79csize 4689074123456789101112131415161718192021222324252627{ "backend": "tokenizers", "boi_token": "<start_of_image>", "bos_token": "<bos>", "clean_up_tokenization_spaces": false, "eoi_token": "<end_of_image>", "eos_token": "<end_of_turn>", "image_token": "<image_soft_token>", "is_local": false, "local_files_only": false, "mask_token": "<mask>", "model_max_length": 1000000000000000019884624838656, "model_specific_special_tokens": { "boi_token": "<start_of_image>", "eoi_token": "<end_of_image>", "image_token": "<image_soft_token>" }, "pad_token": "<pad>", "padding_side": "right", "processor_class": "Gemma3Processor", "sp_model_kwargs": null, "spaces_between_special_tokens": false, "split_special_tokens": false, "tokenizer_class": "GemmaTokenizer", "unk_token": "<unk>", "use_default_system_prompt": false}.gitattributesAdded+40
LICENSEAdded+180
LICENSE_FAQ.pdfAdded+3
Model_Documentation_Form.pdfAdded+3
README.mdAdded+253
borealis.pngAdded

Large File Pointer Details
- SHA256: 5e6d03db57f4f12b359910620c4ba80b70f4fe0711d8125600434663137eb528
- Pointer size: 131 Bytes
- Size of remote file: 778 kB
borealis_evals_202605.pngAdded

Large File Pointer Details
- SHA256: 5f2b6e74b343ba10c6ee5e8a7913a70d8b8e5335a4138ef583ee2baeb9e07655
- Pointer size: 131 Bytes
- Size of remote file: 130 kB
chat_template.jinjaAdded+47
config.jsonAdded+122
generation_config.jsonAdded+14
model.safetensorsAdded+3
preprocessor_config.jsonAdded+29
processor_config.jsonAdded+4
signing/SHA256SUMSAdded+10
signing/SHA256SUMS.sigAdded
signing/ca-chain.pemAdded+72
signing/cert.pemAdded+39
signing/verify.shAdded+98
special_tokens_map.jsonAdded+33
tokenizer.jsonAdded+3
tokenizer.modelAdded+3
tokenizer_config.jsonAdded+27