NbAiLab / nb-llama-3.1-8B-Instruct

huggingface.co
Total runs: 67
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: December 11 2024
text-generation

Introduction of nb-llama-3.1-8B-Instruct

Model Details of nb-llama-3.1-8B-Instruct

Model Card: NB-Llama-3.1-8B-Instruct

Model Overview

NB-Llama-3.1-8B-Instruct is part of the NB-Llama-3.1 series of models, trained on top of Llama-3.1-8B-Instruct . This multilingual generative model was fine-tuned specifically to support Norwegian Bokmål, Norwegian Nynorsk, and English, with partial support for Swedish and Danish.

The Instruct-model is trained using Supervised FineTuning (SFT) and then Direct Preference Optimalisation (DPO). The SFT training is based on synthetic datasets, the English Magpie dataset and a translated/filtered version of this dataset. The DPO training is based on Anthropics Helpful and Harmless dataset. The training is supposed to be fairly basic, giving the models a decent undertstanding of a chat template.

The basic idea with this model series was to explore how current state-of-the-art models could be improved for Norwegian by training only on publicly available data. While these models are trained by the National Library of Norway, they do not include data only available through legal deposit. They do, however, contain public data like governmental reports that are both publicly available and legally deposited.


Key Features
  • Base Model : Built on Llama-3.1-8B-Instruct.
  • Languages :
    • Full support: Norwegian Bokmål (nb), Norwegian Nynorsk (nn), English (en).
    • Partial support: Swedish (sv), Danish (da).
  • Purpose : Supports Norwegian-specific tasks such as question-answering, summarization, and language modeling, while being capable of multilingual generation and translation. Efforts have been made to preserve the English capabilities from the underlying Meta Llama model.
  • Training Data : Combines publicly available multilingual datasets with synthetic data generation, focusing on Norwegian, English, Swedish, and Danish sources. Additional details are provided below.
  • Architecture : The model uses the Llama 3.1 architecture. It is an auto-regressive language model with an optimized transformer architecture. The tuned versions use supervised fine-tuning (SFT) and Direct Preference Optimization (DPO) for alignment.

Model Details
  • Developer : National Library of Norway (NB-AiLab).
  • Parameters : 8 billion.
  • Knowledge Cutoff : May 2024.
  • License : Llama 3.1 Community License .

Motivation

The primary goal of NB-Llama-3.1-8B-Instruct is to advance support for Norwegian language technologies and strengthen support for Norwegian Bokmål and Norwegian Nynorsk. Since much knowledge and culture are also expressed in English, Swedish, and Danish, open sources in these languages are included in the training datasets when possible.


Intended Use
Use Cases
  • Dialogue systems.
  • General multilingual text generation and language modeling.
  • Norwegian-specific tasks such as:
    • Summarization of texts in Bokmål or Nynorsk.
    • Question-answering tailored to Norwegian cultural and linguistic contexts.
Out-of-Scope
  • Use in violation of applicable laws or regulations.
  • Tasks outside the supported languages without additional fine-tuning.
  • High-risk domains without appropriate safety measures.

How to Use

Please note tht this is still a research project, and the purpose of releasing the models are to investigate the potential in adapting these models for Norwegian language. The intented use case is experiemental. For end-users, we strongly recommend using the instruction-tuned models. We provide quantized models with close to the same accuracy that will run much faster on most platforms. When fine-tuning the instruction-tuned models, best results are obtained when applying the appropriate templates from Llama 3.1.

Using transformers
import torch
from transformers import pipeline

model_id = "NbAiLab/nb-llama-3.1-8B-Instruct"
pipe = pipeline(
    "text-generation",
    model=model_id,
    torch_dtype=torch.bfloat16,
    device_map="auto",
)
messages = [
    {"role": "user", "content": "Hvem er du?"},
]
outputs = pipe(
    messages,
    max_new_tokens=256,
)
print(outputs[0]["generated_text"][-1])

Training Data

Overview:

The training data is based entirely on publicly available datasets and synthetically generated data. A key aspect of the training process was leveraging high-quality knowledge sources in Norwegian, English, Swedish, and Danish.

For SFT and DPO the following data were used:


Licensing

The model is released under the Llama 3.1 Community License , allowing for research and commercial use within defined limitations. Refer to the Acceptable Use Policy for specific restrictions.


Citing & Authors

The model was trained and documentation written by Per Egil Kummervold.

Runs of NbAiLab nb-llama-3.1-8B-Instruct on huggingface.co

67
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About nb-llama-3.1-8B-Instruct huggingface.co Model

More nb-llama-3.1-8B-Instruct license Visit here:

https://choosealicense.com/licenses/llama3.1

nb-llama-3.1-8B-Instruct huggingface.co

nb-llama-3.1-8B-Instruct huggingface.co is an AI model on huggingface.co that provides nb-llama-3.1-8B-Instruct's model effect (), which can be used instantly with this NbAiLab nb-llama-3.1-8B-Instruct model. huggingface.co supports a free trial of the nb-llama-3.1-8B-Instruct model, and also provides paid use of the nb-llama-3.1-8B-Instruct. Support call nb-llama-3.1-8B-Instruct model through api, including Node.js, Python, http.

nb-llama-3.1-8B-Instruct huggingface.co Url

https://huggingface.co/NbAiLab/nb-llama-3.1-8B-Instruct

NbAiLab nb-llama-3.1-8B-Instruct online free

nb-llama-3.1-8B-Instruct huggingface.co is an online trial and call api platform, which integrates nb-llama-3.1-8B-Instruct's modeling effects, including api services, and provides a free online trial of nb-llama-3.1-8B-Instruct, you can try nb-llama-3.1-8B-Instruct online for free by clicking the link below.

NbAiLab nb-llama-3.1-8B-Instruct online free url in huggingface.co:

https://huggingface.co/NbAiLab/nb-llama-3.1-8B-Instruct

nb-llama-3.1-8B-Instruct install

nb-llama-3.1-8B-Instruct is an open source model from GitHub that offers a free installation service, and any user can find nb-llama-3.1-8B-Instruct on GitHub to install. At the same time, huggingface.co provides the effect of nb-llama-3.1-8B-Instruct install, users can directly use nb-llama-3.1-8B-Instruct installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

nb-llama-3.1-8B-Instruct install url in huggingface.co:

https://huggingface.co/NbAiLab/nb-llama-3.1-8B-Instruct

Url of nb-llama-3.1-8B-Instruct

nb-llama-3.1-8B-Instruct huggingface.co Url

Provider of nb-llama-3.1-8B-Instruct huggingface.co

NbAiLab
ORGANIZATIONS

Other API from NbAiLab

huggingface.co

Total runs: 17.9K
Run Growth: 6.2K
Growth Rate: 34.41%
Updated:April 10 2026
huggingface.co

Total runs: 8.3K
Run Growth: 7.4K
Growth Rate: 93.93%
Updated:May 25 2026
huggingface.co

Total runs: 3.7K
Run Growth: -818
Growth Rate: -22.13%
Updated:September 07 2023
huggingface.co

Total runs: 2.2K
Run Growth: 2.1K
Growth Rate: 94.95%
Updated:May 25 2026
huggingface.co

Total runs: 1.5K
Run Growth: -194
Growth Rate: -13.08%
Updated:September 11 2023
huggingface.co

Total runs: 1.3K
Run Growth: 1.2K
Growth Rate: 89.58%
Updated:May 25 2026
huggingface.co

Total runs: 241
Run Growth: 0
Growth Rate: 0.00%
Updated:January 21 2025