Downloads · 30 days
29
2% of all-time downloads
NbAiLab/nb-llama-3.2-1B
nb-llama-3.2-1B is a text generation model from NbAiLab. Use it when you need the model to write or continue text. The card lists the license as llama3.2.
Downloads · 30 days
29
2% of all-time downloads
All-time downloads
1.6K
Public
Parameters
1.2B
4.9 GB on disk
Likes
3
Public
Click a slice to open those files.
.safetensors4.9 GB · 100%
From the Hugging Face model README
NB-Llama-3.2-1B is part of the NB-Llama-3.2 series of models, trained on top of Llama-3.2-1B. 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 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.
The primary goal of NB-Llama-3.2-1B 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.
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.2.
transformersimport transformers
model_id = "NbAiLab/nb-llama-3.2-1B"
pipeline = transformers.pipeline(
"text-generation",
model=model_id,
model_kwargs={"torch_dtype": "bfloat16"},
device_map="auto"
)
output = pipeline("Hva er Nasjonalbibliotekets rolle i AI-utvikling?")
print(output)
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.
Parts of the following publicly available datasets were used:
To ensure the highest quality training data, only a small subset of the original raw data was used. Corpus Quality Classifiers built on nb-bert-base were trained to evaluate both educational value and linguistic quality of the training samples. These models are released along with the NB-Llama-3.x models, and are considered the main output from this initiative.
The model is released under the Llama 3.2 Community License, allowing for research and commercial use within defined limitations. Refer to the Acceptable Use Policy for specific restrictions.
The model was trained and documentation written by Per Egil Kummervold as part of the NoTraM-project.
Training this model was supported by Google’s TPU Research Cloud (TRC), which generously supplied us with Cloud TPUs essential for our computational needs.