Run this model with HF Jobs

Run Rasuluzd/MPLM-3.8B-MathCode 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/Rasuluzd/MPLM-3.8B-MathCode. 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/Rasuluzd/MPLM-3.8B-MathCode 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/Rasuluzd/MPLM-3.8B-MathCode. 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/Rasuluzd/MPLM-3.8B-MathCode. 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.

MPLM 3.8B MathCode

MPLM 3.8B MathCode is a 3.80B-parameter Norwegian base language model from Team MPLT, built during IN5640 at the University of Oslo. It is an experiment: it shares the first 28,000 training steps with MPLM-3.8B-Base and spends the remaining 8,717 steps on a mixture that adds math and code text. It continues text and has no chat template.

This checkpoint is the parent of the chat model MPLM-3.8B-Instruct. For general Norwegian text, MPLM-3.8B-Base is the plainer choice: the two score the same on Norwegian benchmarks and the original has slightly lower loss on held-out Norwegian.

Parameters Architecture Context Vocabulary Format
3.80B Qwen3-style decoder, 36 layers 4,096 tokens 64,000 (byte-level BPE) BF16 Safetensors

Training

The first 28,000 steps are the original production run: 90% Norwegian and 10% English web text from a pre-release of the HPLT 4.0 collection. From that checkpoint, 8,717 steps (18.281B token positions) used 72% native Norwegian, 8% English, 12% FineMath-4+ and 8% OpenCoder web-page text. The total is the same 77.001B token positions as the original. Learning-rate decay began at the branch point, 1,374 steps earlier than in the original, so the two checkpoints differ in both data and schedule. The continuation used 352.7 GPU-hours on 32 GH200 GPUs.

What the continuation changed

All numbers were measured by the team in the same harness for both checkpoints.

Measure MPLM 3.8B Base MPLM 3.8B MathCode
NorEval 1.1, Norwegian mean (16 conditions, zero-shot) 0.392 0.393
English mean (5 tasks, zero-shot) 0.547 0.552
Loss on held-out Norwegian 2.113 2.131
Scandinavian language identification (SLIDE) 0.385 0.451
GSM8K, five examples in the prompt 28 of 1,319 48 of 1,319
HumanEval pass@1 0 of 164 0 of 164
  • Norwegian: unchanged on the benchmark mean, slightly worse on held-out loss.
  • Math: a small gain at a low level. The FineMath pool contains text that overlaps 107 GSM8K test questions under a 13-word matching rule. Without those questions the result is 46 against 25 of 1,212.
  • Code: no functional gain. More completions parse as Python (64 against 14), but none passes its tests, and many lose indentation. The code source is web-page text about code.

Limitations

  • In NorTruthfulQA the correct option is always listed first, so scores on that task partly reflect a position preference. It is included in the Norwegian mean above.
  • The comparison is one pair of runs. It cannot separate the effect of the added data from the earlier learning-rate decay.
  • The training data is filtered web text. The model can produce false, offensive or private-looking content.

Generate text

Set MPLM_MODEL to this repository's ID or to a local copy of it. The tokenizer adds no beginning-of-sequence token, so give the model text to continue.

import os
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = os.environ["MPLM_MODEL"]
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, dtype=torch.bfloat16).to("cuda").eval()
inputs = tokenizer("Bergen er en by på Vestlandet som", return_tensors="pt").to(model.device)
with torch.inference_mode():
    output = model.generate(**inputs, max_new_tokens=64, do_sample=False)
print(tokenizer.decode(output[0], skip_special_tokens=True))

License and data

The weights are released under the Creative Commons Attribution-NonCommercial 4.0 licence (CC BY-NC 4.0): research and other non-commercial use with attribution to Team MPLT. The training text comes from a pre-release of the HPLT 4.0 web collection, FineMath and the OpenCoder web corpus, and keeps the terms of its sources.

The training and evaluation recipes are in the project repository, which requires a University of Oslo login. The release maintainers are Team MPLT, University of Oslo.

Downloads last month
319
Safetensors
Model size
4B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Rasuluzd/MPLM-3.8B-MathCode

Finetuned
(1)
this model
Finetunes
1 model

Datasets used to train Rasuluzd/MPLM-3.8B-MathCode