Image-Text-to-Text
GGUF
Norwegian
Norwegian Bokmål
Norwegian Nynorsk
conversational
instruct
borealis
gemma3
quantized
norwegian
norwegian-bokmal
norwegian-nynorsk
open
🇪🇺 Region: EU
Instructions to use NbAiLab/borealis-open-12b-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use NbAiLab/borealis-open-12b-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="NbAiLab/borealis-open-12b-gguf", filename="borealis-open-12b-BF16.gguf", )
llm.create_chat_completion( 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" } } ] } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use NbAiLab/borealis-open-12b-gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf NbAiLab/borealis-open-12b-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf NbAiLab/borealis-open-12b-gguf:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf NbAiLab/borealis-open-12b-gguf:Q4_K_M # Run inference directly in the terminal: llama-cli -hf NbAiLab/borealis-open-12b-gguf:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf NbAiLab/borealis-open-12b-gguf:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf NbAiLab/borealis-open-12b-gguf:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf NbAiLab/borealis-open-12b-gguf:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf NbAiLab/borealis-open-12b-gguf:Q4_K_M
Use Docker
docker model run hf.co/NbAiLab/borealis-open-12b-gguf:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use NbAiLab/borealis-open-12b-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NbAiLab/borealis-open-12b-gguf" # 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-open-12b-gguf", "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-open-12b-gguf:Q4_K_M
- Ollama
How to use NbAiLab/borealis-open-12b-gguf with Ollama:
ollama run hf.co/NbAiLab/borealis-open-12b-gguf:Q4_K_M
- Unsloth Studio
How to use NbAiLab/borealis-open-12b-gguf with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for NbAiLab/borealis-open-12b-gguf to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for NbAiLab/borealis-open-12b-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for NbAiLab/borealis-open-12b-gguf to start chatting
- Atomic Chat new
- Docker Model Runner
How to use NbAiLab/borealis-open-12b-gguf with Docker Model Runner:
docker model run hf.co/NbAiLab/borealis-open-12b-gguf:Q4_K_M
- Lemonade
How to use NbAiLab/borealis-open-12b-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull NbAiLab/borealis-open-12b-gguf:Q4_K_M
Run and chat with the model
lemonade run user.borealis-open-12b-gguf-Q4_K_M
List all available models
lemonade list
Commit ·
cbc950b
0
Parent(s):
Squash Borealis release history
Browse files- .gitattributes +47 -0
- LICENSE_FAQ.pdf +3 -0
- Model_Documentation_Form.pdf +3 -0
- README.md +183 -0
- borealis-open-12b-BF16.gguf +3 -0
- borealis-open-12b-Q2_K.gguf +3 -0
- borealis-open-12b-Q3_K_M.gguf +3 -0
- borealis-open-12b-Q4_K_M.gguf +3 -0
- borealis-open-12b-Q5_K_M.gguf +3 -0
- borealis-open-12b-Q6_K.gguf +3 -0
- borealis-open-12b-Q8_0.gguf +3 -0
- borealis.png +3 -0
- borealis_evals_202605.png +3 -0
- mmproj_borealis-open-12b-BF16.gguf +3 -0
- signing/SHA256SUMS +8 -0
- signing/SHA256SUMS.sig +0 -0
- signing/ca-chain.pem +72 -0
- signing/cert.pem +39 -0
- signing/verify.sh +98 -0
.gitattributes
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
mmproj_borealis-open-12b-BF16.gguf filter=lfs diff=lfs merge=lfs -text
|
| 37 |
+
LICENSE_FAQ.pdf filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
borealis.png filter=lfs diff=lfs merge=lfs -text
|
| 39 |
+
borealis_evals_202605.png filter=lfs diff=lfs merge=lfs -text
|
| 40 |
+
Model_Documentation_Form.pdf filter=lfs diff=lfs merge=lfs -text
|
| 41 |
+
borealis-open-12b-BF16.gguf filter=lfs diff=lfs merge=lfs -text
|
| 42 |
+
borealis-open-12b-Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
|
| 43 |
+
borealis-open-12b-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
borealis-open-12b-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
borealis-open-12b-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
borealis-open-12b-Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
borealis-open-12b-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
|
LICENSE_FAQ.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b4a87118b0b0c1e2d5a06b27bb4b56517d4d62b2b74860f77b8ac2d601224840
|
| 3 |
+
size 140945
|
Model_Documentation_Form.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3d02414fd03719b3117fea3525851971e82bf36736ae6aa957e2c957ee232544
|
| 3 |
+
size 333821
|
README.md
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: gemma
|
| 3 |
+
datasets:
|
| 4 |
+
- NbAiLab/aurora-sft-open
|
| 5 |
+
language:
|
| 6 |
+
- 'no'
|
| 7 |
+
- nb
|
| 8 |
+
- nn
|
| 9 |
+
base_model:
|
| 10 |
+
- NbAiLab/borealis-open-12b
|
| 11 |
+
pipeline_tag: image-text-to-text
|
| 12 |
+
library_name: gguf
|
| 13 |
+
tags:
|
| 14 |
+
- conversational
|
| 15 |
+
- instruct
|
| 16 |
+
- borealis
|
| 17 |
+
- gemma3
|
| 18 |
+
- gguf
|
| 19 |
+
- quantized
|
| 20 |
+
- norwegian
|
| 21 |
+
- norwegian-bokmal
|
| 22 |
+
- norwegian-nynorsk
|
| 23 |
+
- open
|
| 24 |
+
---
|
| 25 |
+
|
| 26 |
+

|
| 27 |
+
|
| 28 |
+
# Borealis Open 12B GGUF
|
| 29 |
+
|
| 30 |
+
## Model Summary
|
| 31 |
+
|
| 32 |
+
**NbAiLab/borealis-open-12b-gguf** is a GGUF release of **12B-parameter** instruction-tuned **open release** model in the Borealis family from the National Library of Norway (Nasjonalbiblioteket, NB).
|
| 33 |
+
|
| 34 |
+
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.
|
| 35 |
+
|
| 36 |
+
All Borealis released models are based on the **Gemma 3** family. This GGUF repository is based on the corresponding [NbAiLab/borealis-open-12b](https://huggingface.co/NbAiLab/borealis-open-12b) safetensors release.
|
| 37 |
+
|
| 38 |
+
### Sizes
|
| 39 |
+
|
| 40 |
+
| Size | Full release | Open release |
|
| 41 |
+
|---:|---|---|
|
| 42 |
+
| 27B | [NbAiLab/borealis-27b](https://huggingface.co/NbAiLab/borealis-27b) | [NbAiLab/borealis-open-27b](https://huggingface.co/NbAiLab/borealis-open-27b) |
|
| 43 |
+
| 12B | [NbAiLab/borealis-12b](https://huggingface.co/NbAiLab/borealis-12b) | [NbAiLab/borealis-open-12b](https://huggingface.co/NbAiLab/borealis-open-12b) |
|
| 44 |
+
| 4B | [NbAiLab/borealis-4b](https://huggingface.co/NbAiLab/borealis-4b) | [NbAiLab/borealis-open-4b](https://huggingface.co/NbAiLab/borealis-open-4b) |
|
| 45 |
+
| 1B | [NbAiLab/borealis-1b](https://huggingface.co/NbAiLab/borealis-1b) | [NbAiLab/borealis-open-1b](https://huggingface.co/NbAiLab/borealis-open-1b) |
|
| 46 |
+
| 270M | [NbAiLab/borealis-270m](https://huggingface.co/NbAiLab/borealis-270m) | [NbAiLab/borealis-open-270m](https://huggingface.co/NbAiLab/borealis-open-270m) |
|
| 47 |
+
|
| 48 |
+
## Training Data
|
| 49 |
+
|
| 50 |
+
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.
|
| 51 |
+
|
| 52 |
+
The SFT dataset for this model is [NbAiLab/aurora-sft-open](https://huggingface.co/datasets/NbAiLab/aurora-sft-open). [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.
|
| 53 |
+
|
| 54 |
+
## Evaluation
|
| 55 |
+
|
| 56 |
+
<figure>
|
| 57 |
+
<img src="./borealis_evals_202605.png" alt="Borealis evaluation results">
|
| 58 |
+
<figcaption>Borealis evaluation results on selected tasks (best score among {0-5}-shot).</figcaption>
|
| 59 |
+
</figure>
|
| 60 |
+
|
| 61 |
+
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. The full Borealis models include around 10k newspaper-derived tasks from the abovementioned agreement and show a slight performance increase in some key metrics compared with the open variants. We hope to further increase the difference by incorporating proper pre-training on the newspaper material.
|
| 62 |
+
|
| 63 |
+
## Safety and Alignment
|
| 64 |
+
|
| 65 |
+
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.
|
| 66 |
+
|
| 67 |
+
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.
|
| 68 |
+
|
| 69 |
+
### Prompt Baking
|
| 70 |
+
|
| 71 |
+
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.
|
| 72 |
+
|
| 73 |
+
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.
|
| 74 |
+
|
| 75 |
+
## Intended Use
|
| 76 |
+
|
| 77 |
+
- Norwegian-centric assistant-style tasks, including drafting, summarization, Q&A, and light reasoning (this is not a reasoning model).
|
| 78 |
+
- Assessment and improvement of Norwegian writing style and quality.
|
| 79 |
+
- Evaluation of behavior and language coverage for Norwegian, Bokmål, and Nynorsk.
|
| 80 |
+
|
| 81 |
+
## Usage
|
| 82 |
+
|
| 83 |
+
This repository contains GGUF files for `NbAiLab/borealis-open-12b`. For Transformers or
|
| 84 |
+
vLLM serving from safetensors, use the main model repository: `NbAiLab/borealis-open-12b`.
|
| 85 |
+
|
| 86 |
+
### llama.cpp
|
| 87 |
+
|
| 88 |
+
Run a GGUF directly from the Hub:
|
| 89 |
+
|
| 90 |
+
```bash
|
| 91 |
+
llama-server -hf NbAiLab/borealis-open-12b-gguf --port 8080
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
Or download a GGUF file and run it locally:
|
| 95 |
+
|
| 96 |
+
```bash
|
| 97 |
+
llama-cli -m borealis-open-12b-Q4_K_M.gguf \
|
| 98 |
+
-p "Skriv et kort sammendrag av hva Nasjonalbiblioteket gjør." \
|
| 99 |
+
-n 256
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
For image-text use with llama.cpp, use the matching projector file from this
|
| 103 |
+
repository, for example `mmproj_borealis-open-12b-BF16.gguf`, together with a model GGUF.
|
| 104 |
+
|
| 105 |
+
### Ollama
|
| 106 |
+
|
| 107 |
+
Run the GGUF repository from Hugging Face:
|
| 108 |
+
|
| 109 |
+
```bash
|
| 110 |
+
ollama run hf.co/NbAiLab/borealis-open-12b-gguf
|
| 111 |
+
```
|
| 112 |
+
|
| 113 |
+
For a local GGUF file, create a minimal `Modelfile`:
|
| 114 |
+
|
| 115 |
+
```text
|
| 116 |
+
FROM ./borealis-open-12b-Q4_K_M.gguf
|
| 117 |
+
```
|
| 118 |
+
|
| 119 |
+
Then create and run the local Ollama model:
|
| 120 |
+
|
| 121 |
+
```bash
|
| 122 |
+
ollama create borealis-open-12b -f Modelfile
|
| 123 |
+
ollama run borealis-open-12b "Skriv tre korte punkter om norsk språkteknologi."
|
| 124 |
+
```
|
| 125 |
+
|
| 126 |
+
## Limitations
|
| 127 |
+
|
| 128 |
+
- The model may hallucinate or produce incorrect information.
|
| 129 |
+
- Safety alignment reduces but does not eliminate harmful or inappropriate outputs.
|
| 130 |
+
- Performance outside Norwegian and English use cases has not been fully characterized.
|
| 131 |
+
|
| 132 |
+
## EU AI Act
|
| 133 |
+
|
| 134 |
+
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.
|
| 135 |
+
|
| 136 |
+
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.
|
| 137 |
+
|
| 138 |
+
For additional model-level documentation, see the [Model Documentation Form](./Model_Documentation_Form.pdf).
|
| 139 |
+
|
| 140 |
+
## License
|
| 141 |
+
|
| 142 |
+
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.
|
| 143 |
+
|
| 144 |
+
For more information, see the [LICENSE](./LICENSE) and the [License FAQ](./LICENSE_FAQ.pdf).
|
| 145 |
+
|
| 146 |
+
## Authenticity
|
| 147 |
+
|
| 148 |
+
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.
|
| 149 |
+
|
| 150 |
+
To verify model authenticity and file integrity after downloading the repository, run:
|
| 151 |
+
|
| 152 |
+
```bash
|
| 153 |
+
bash signing/verify.sh
|
| 154 |
+
```
|
| 155 |
+
|
| 156 |
+
For more verification instructions, see [ai.nb.no/verify](https://ai.nb.no/verify).
|
| 157 |
+
|
| 158 |
+
## Weights
|
| 159 |
+
|
| 160 |
+
This repository contains the Transformers (safetensors) release of **NbAiLab/borealis-open-12b-gguf**.
|
| 161 |
+
|
| 162 |
+
Companion formats:
|
| 163 |
+
- GGUF: [NbAiLab/borealis-open-12b-gguf](https://huggingface.co/NbAiLab/borealis-open-12b-gguf)
|
| 164 |
+
- MLX: [NbAiLab/borealis-open-12b-mlx](https://huggingface.co/NbAiLab/borealis-open-12b-mlx)
|
| 165 |
+
- MLX 8-bit: [NbAiLab/borealis-open-12b-mlx-8bits](https://huggingface.co/NbAiLab/borealis-open-12b-mlx-8bits)
|
| 166 |
+
|
| 167 |
+
## Citation and Contributors
|
| 168 |
+
|
| 169 |
+
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.
|
| 170 |
+
|
| 171 |
+
A tecnical report will be released soon.
|
| 172 |
+
|
| 173 |
+
## Acknowledgements
|
| 174 |
+
|
| 175 |
+
Thanks to the Gemma team at Google for releasing Gemma 3, and to everyone contributing to the Norwegian language technology ecosystem.
|
| 176 |
+
|
| 177 |
+
## Disclaimer
|
| 178 |
+
|
| 179 |
+
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.
|
| 180 |
+
|
| 181 |
+
## Contact
|
| 182 |
+
|
| 183 |
+
For feedback, technical concerns, or collaboration inquiries, please contact <a rel="noopener nofollow" href="mailto:ailab@nb.no">ailab@nb.no</a>.
|
borealis-open-12b-BF16.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:708d4ff2b840893ecdc150fcc6e54ee9afb513740dec0d43af310c06148fb1f1
|
| 3 |
+
size 23540152352
|
borealis-open-12b-Q2_K.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8ac001206b3dad8ac2785fbe1595b629e7cea8f241b9dbf3824d303277e858ac
|
| 3 |
+
size 4768222112
|
borealis-open-12b-Q3_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7589eb1776076c81acaf0889bb12d75fa4954e0bf995e41ac4b5072b7bec4cb6
|
| 3 |
+
size 6008818592
|
borealis-open-12b-Q4_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f8307f427b915356dcce52651ab26edbb302a7c5d9d457d205f2d58197b357a3
|
| 3 |
+
size 7300778912
|
borealis-open-12b-Q5_K_M.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3bc57acf6c17d2f394b69c2131a03db3df01606a2067a17c39a3b2bcdaa9703f
|
| 3 |
+
size 8445037472
|
borealis-open-12b-Q6_K.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:30c9f2f3858cf038656034ae304e7aa3affe5e7267072c8ab1a4373b53475859
|
| 3 |
+
size 9660812192
|
borealis-open-12b-Q8_0.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dc2218d61bd555de08e62a4a36a8f1786b02e0de6d89dc03cb40f3b0b9531568
|
| 3 |
+
size 12510213152
|
borealis.png
ADDED
|
Git LFS Details
|
borealis_evals_202605.png
ADDED
|
Git LFS Details
|
mmproj_borealis-open-12b-BF16.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b28b8231f7e8ed65262dab38c261298139665203bd3f69532947cdf458e5bb9a
|
| 3 |
+
size 854201344
|
signing/SHA256SUMS
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
708d4ff2b840893ecdc150fcc6e54ee9afb513740dec0d43af310c06148fb1f1 borealis-open-12b-BF16.gguf
|
| 2 |
+
8ac001206b3dad8ac2785fbe1595b629e7cea8f241b9dbf3824d303277e858ac borealis-open-12b-Q2_K.gguf
|
| 3 |
+
7589eb1776076c81acaf0889bb12d75fa4954e0bf995e41ac4b5072b7bec4cb6 borealis-open-12b-Q3_K_M.gguf
|
| 4 |
+
f8307f427b915356dcce52651ab26edbb302a7c5d9d457d205f2d58197b357a3 borealis-open-12b-Q4_K_M.gguf
|
| 5 |
+
3bc57acf6c17d2f394b69c2131a03db3df01606a2067a17c39a3b2bcdaa9703f borealis-open-12b-Q5_K_M.gguf
|
| 6 |
+
30c9f2f3858cf038656034ae304e7aa3affe5e7267072c8ab1a4373b53475859 borealis-open-12b-Q6_K.gguf
|
| 7 |
+
dc2218d61bd555de08e62a4a36a8f1786b02e0de6d89dc03cb40f3b0b9531568 borealis-open-12b-Q8_0.gguf
|
| 8 |
+
b28b8231f7e8ed65262dab38c261298139665203bd3f69532947cdf458e5bb9a mmproj_borealis-open-12b-BF16.gguf
|
signing/SHA256SUMS.sig
ADDED
|
Binary file (512 Bytes). View file
|
|
|
signing/ca-chain.pem
ADDED
|
@@ -0,0 +1,72 @@
|
|
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azpd3/IlTal9T400rzc2OkQ
|
| 37 |
+
V89AmB9F8G7ZuHduRA/TKhKL/xFq+rQs0G2S41IgqTRX0Ss6wgNv/pBDWr+3kYgV
|
| 38 |
+
4M7Vr6zpk7ZogqJKcXZpwnegxchSdjMn62WESKM636yJYdsZAikCs8T+sopK
|
| 39 |
+
-----END CERTIFICATE-----
|
signing/verify.sh
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/bash
|
| 2 |
+
#
|
| 3 |
+
# Verify the integrity and authenticity of this model release.
|
| 4 |
+
#
|
| 5 |
+
# Usage: bash signing/verify.sh
|
| 6 |
+
#
|
| 7 |
+
# This script verifies:
|
| 8 |
+
# 1. The signing certificate is issued by a trusted CA
|
| 9 |
+
# 2. The SHA256SUMS manifest was signed by Nasjonalbiblioteket
|
| 10 |
+
# 3. All file checksums match the manifest
|
| 11 |
+
#
|
| 12 |
+
|
| 13 |
+
set -euo pipefail
|
| 14 |
+
|
| 15 |
+
RED='\033[0;31m'
|
| 16 |
+
GREEN='\033[0;32m'
|
| 17 |
+
NC='\033[0m'
|
| 18 |
+
|
| 19 |
+
pass() { echo -e "${GREEN}[PASS]${NC} $*"; }
|
| 20 |
+
fail() { echo -e "${RED}[FAIL]${NC} $*" >&2; }
|
| 21 |
+
|
| 22 |
+
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
| 23 |
+
MODEL_DIR="$(dirname "$SCRIPT_DIR")"
|
| 24 |
+
SIGNING_DIR="$SCRIPT_DIR"
|
| 25 |
+
|
| 26 |
+
cd "$MODEL_DIR"
|
| 27 |
+
|
| 28 |
+
errors=0
|
| 29 |
+
|
| 30 |
+
# Check required files exist
|
| 31 |
+
for f in "$SIGNING_DIR/SHA256SUMS" "$SIGNING_DIR/SHA256SUMS.sig" \
|
| 32 |
+
"$SIGNING_DIR/cert.pem" "$SIGNING_DIR/ca-chain.pem"; do
|
| 33 |
+
if [[ ! -f "$f" ]]; then
|
| 34 |
+
fail "Missing file: $f"
|
| 35 |
+
errors=$((errors + 1))
|
| 36 |
+
fi
|
| 37 |
+
done
|
| 38 |
+
|
| 39 |
+
if [[ $errors -gt 0 ]]; then
|
| 40 |
+
echo ""
|
| 41 |
+
fail "Required signing files are missing. Cannot verify."
|
| 42 |
+
exit 1
|
| 43 |
+
fi
|
| 44 |
+
|
| 45 |
+
echo "=== Nasjonalbiblioteket Model Verification ==="
|
| 46 |
+
echo ""
|
| 47 |
+
|
| 48 |
+
# Show certificate info
|
| 49 |
+
echo "Certificate subject:"
|
| 50 |
+
openssl x509 -in "$SIGNING_DIR/cert.pem" -subject -noout 2>/dev/null | sed 's/^subject=/ /'
|
| 51 |
+
echo "Certificate issuer:"
|
| 52 |
+
openssl x509 -in "$SIGNING_DIR/cert.pem" -issuer -noout 2>/dev/null | sed 's/^issuer=/ /'
|
| 53 |
+
echo "Certificate fingerprint (SHA-256):"
|
| 54 |
+
openssl x509 -in "$SIGNING_DIR/cert.pem" -fingerprint -sha256 -noout 2>/dev/null | sed 's/^.*=/ /'
|
| 55 |
+
echo ""
|
| 56 |
+
|
| 57 |
+
# 1. Verify certificate chain
|
| 58 |
+
echo "--- Step 1: Verify certificate chain ---"
|
| 59 |
+
if openssl verify -CAfile "$SIGNING_DIR/ca-chain.pem" "$SIGNING_DIR/cert.pem" > /dev/null 2>&1; then
|
| 60 |
+
pass "Certificate chain is valid."
|
| 61 |
+
else
|
| 62 |
+
fail "Certificate chain verification failed!"
|
| 63 |
+
errors=$((errors + 1))
|
| 64 |
+
fi
|
| 65 |
+
|
| 66 |
+
# 2. Verify signature
|
| 67 |
+
echo "--- Step 2: Verify manifest signature ---"
|
| 68 |
+
PUBKEY=$(mktemp)
|
| 69 |
+
trap "rm -f '$PUBKEY'" EXIT
|
| 70 |
+
openssl x509 -in "$SIGNING_DIR/cert.pem" -pubkey -noout > "$PUBKEY" 2>/dev/null
|
| 71 |
+
|
| 72 |
+
if openssl dgst -sha256 -verify "$PUBKEY" \
|
| 73 |
+
-signature "$SIGNING_DIR/SHA256SUMS.sig" \
|
| 74 |
+
"$SIGNING_DIR/SHA256SUMS" > /dev/null 2>&1; then
|
| 75 |
+
pass "Manifest signature is valid."
|
| 76 |
+
else
|
| 77 |
+
fail "Manifest signature verification failed!"
|
| 78 |
+
errors=$((errors + 1))
|
| 79 |
+
fi
|
| 80 |
+
|
| 81 |
+
# 3. Verify file checksums
|
| 82 |
+
echo "--- Step 3: Verify file checksums ---"
|
| 83 |
+
if sha256sum -c "$SIGNING_DIR/SHA256SUMS" 2>/dev/null; then
|
| 84 |
+
pass "All file checksums match."
|
| 85 |
+
else
|
| 86 |
+
fail "One or more file checksums do not match!"
|
| 87 |
+
errors=$((errors + 1))
|
| 88 |
+
fi
|
| 89 |
+
|
| 90 |
+
# Summary
|
| 91 |
+
echo ""
|
| 92 |
+
if [[ $errors -eq 0 ]]; then
|
| 93 |
+
echo -e "${GREEN}✅ Verification successful. All files are authentic and unmodified.${NC}"
|
| 94 |
+
exit 0
|
| 95 |
+
else
|
| 96 |
+
echo -e "${RED}❌ Verification failed with $errors error(s).${NC}"
|
| 97 |
+
exit 1
|
| 98 |
+
fi
|