north / nb-llama-3.2-3B-sft

huggingface.co
Total runs: 19
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: November 28 2024
text-generation

Introduction of nb-llama-3.2-3B-sft

Model Details of nb-llama-3.2-3B-sft

Model Card: NB-Llama-3.2-3B-sft

Model Overview

This is the SFT-version of the NB-Llama-models. This means the model has gone through supervised finetuning, and it now understands a basic template. Note that this model has not yet been aligned, so it will behave fairly unpredictable. It is most suited for additional fine tuning.

NB-Llama-3.2-3B-sft is part of the NB-Llama-3.2 series of models, trained on top of Llama-3.2-3B . 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.


Key Features
  • Base Model : Built on Llama-3.2-3B.
  • 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.2 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 : 3 billion.
  • Knowledge Cutoff : May 2024.
  • License : Llama 3.2 Community License .

Motivation

The primary goal of NB-Llama-3.2-3B-sft 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.2.

Using transformers
import torch
from transformers import pipeline

model_id = "north/nb-llama-3.2-3B-sft"
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.

Parts of the following publicly available datasets were used:


Data Selection

To ensure the highest quality training data, only a small subset of the original raw data was used. An encoder-only classifier built on nb-bert-base was trained to evaluate both educational value and linguistic quality of the training samples.

  • Categorization Methods:
    • Inspired by the FineWeb project.
    • Evaluated for:
      • Educational Value: Prioritizing high-value training samples.
      • Linguistic Quality: Ensuring clarity and accuracy in training data.
  • Guidance and Release:

Licensing

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.


Runs of north nb-llama-3.2-3B-sft on huggingface.co

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

More Information About nb-llama-3.2-3B-sft huggingface.co Model

More nb-llama-3.2-3B-sft license Visit here:

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

nb-llama-3.2-3B-sft huggingface.co

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

nb-llama-3.2-3B-sft huggingface.co Url

https://huggingface.co/north/nb-llama-3.2-3B-sft

north nb-llama-3.2-3B-sft online free

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

north nb-llama-3.2-3B-sft online free url in huggingface.co:

https://huggingface.co/north/nb-llama-3.2-3B-sft

nb-llama-3.2-3B-sft install

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

nb-llama-3.2-3B-sft install url in huggingface.co:

https://huggingface.co/north/nb-llama-3.2-3B-sft

Url of nb-llama-3.2-3B-sft

nb-llama-3.2-3B-sft huggingface.co Url

Provider of nb-llama-3.2-3B-sft huggingface.co

north
ORGANIZATIONS

Other API from north

huggingface.co

Total runs: 30
Run Growth: 4
Growth Rate: 13.33%
Updated:October 13 2022
huggingface.co

Total runs: 11
Run Growth: 6
Growth Rate: 54.55%
Updated:October 13 2022
huggingface.co

Total runs: 9
Run Growth: 1
Growth Rate: 11.11%
Updated:October 13 2022