A LoRA adapter by ToSee that fine-tunes OpenMOSS-Team/MOSS-TTS (MossTTSDelay 8B) for improved Norwegian speech synthesis.
Motivation
MOSS-TTS supports 20 languages — Norwegian is not one of them. This LoRA adapter extends the 8B-parameter foundation model to Norwegian through parameter-efficient fine-tuning, adding just 167 MB of weights (~2% of the base model). As part of ToSee's commitment to open-sourcing our speech technology work, we are releasing this adapter as a stable, citable artifact for the research community. We plan to publish additional fine-tunes, LoRA adapters, and research in the future. For production use of this and other internal models, we will be providing an API — visit tosee.no for updates.
This is a community fine-tune, not an official MOSS-TTS language release.
1import importlib.util
2from pathlib import Path
34import torch
5import torchaudio
6from peft import PeftModel
7from transformers import AutoModel, AutoProcessor
89# Disable broken cuDNN SDPA backend10torch.backends.cuda.enable_cudnn_sdp(False)11torch.backends.cuda.enable_flash_sdp(True)12torch.backends.cuda.enable_mem_efficient_sdp(True)13torch.backends.cuda.enable_math_sdp(True)1415base_model_id ="OpenMOSS-Team/MOSS-TTS"16adapter_id ="ToSee-Norway/MOSS-TTS-Norwegian-LoRA"1718device ="cuda"if torch.cuda.is_available()else"cpu"19dtype = torch.bfloat16 if device =="cuda"else torch.float32
202122defresolve_attn_implementation()->str:23if(24 device =="cuda"25and importlib.util.find_spec("flash_attn")isnotNone26and dtype in{torch.float16, torch.bfloat16}27):28 major, _ = torch.cuda.get_device_capability()29if major >=8:30return"flash_attention_2"31if device =="cuda":32return"sdpa"33return"eager"343536attn_implementation = resolve_attn_implementation()3738# Load processor39processor = AutoProcessor.from_pretrained(base_model_id, trust_remote_code=True)40processor.audio_tokenizer = processor.audio_tokenizer.to(device)4142# Load base model + LoRA adapter43model = AutoModel.from_pretrained(44 base_model_id,45 trust_remote_code=True,46 attn_implementation=attn_implementation,47 torch_dtype=dtype,48)49model = PeftModel.from_pretrained(model, adapter_id)50model = model.to(device)51model.eval()5253# Generate Norwegian speech54text ="Hei og velkommen. Dette er en test av den norske stemmen."5556conversations =[[processor.build_user_message(text=text)]]5758with torch.no_grad():59 batch = processor(conversations, mode="generation")60 input_ids = batch["input_ids"].to(device)61 attention_mask = batch["attention_mask"].to(device)6263 outputs = model.generate(64 input_ids=input_ids,65 attention_mask=attention_mask,66 max_new_tokens=4096,67)6869for message in processor.decode(outputs):70 audio = message.audio_codes_list[0]71 torchaudio.save("output.wav", audio.unsqueeze(0), processor.model_config.sampling_rate)
Voice Cloning with LoRA
You can combine the LoRA adapter with reference audio for Norwegian voice cloning:
python
1ref_audio ="path/to/norwegian_reference.wav"23conversations =[4[processor.build_user_message(text=text, reference=[ref_audio])]5]6# ... same generation code as above
Base vs. Fine-tuned Comparison
The samples/ directory contains comparison audio between the base model and this fine-tuned adapter, both generated with identical settings (seed=42, max_new_tokens=512). Listen for improvements in Norwegian phoneme accuracy, prosody, and the handling of characters like æ, ø, and å.
"Hei og velkommen til denne testen av den norske stemmen. I dag skal vi se hvordan modellen håndterer norsk tale etter finjustering på norske data. Det er spennende å se om modellen har lært å uttale norske ord riktig, inkludert vanskelige lyder som æ, ø og å. Takk for at du lytter, og vi håper du liker resultatet."
Files
├── adapter_config.json # PEFT/LoRA configuration
├── adapter_model.safetensors # LoRA weights (167 MB)
├── README.md # This model card
├── samples/ # Audio comparison samples
│ ├── test_intro_seed42_base_balanced512.wav
│ ├── test_intro_seed42_base_balanced512_metadata.json
│ ├── test_intro_seed42_finetune_balanced512.wav
│ └── test_intro_seed42_finetune_balanced512_metadata.json
├── comparison_summary.json # Base vs fine-tune comparison
└── scripts/ # Training code for reproducibility
├── train_lora.py
└── scratch_long_C_mlp_r16_launch_command.sh
Limitations
Norwegian support comes from LoRA fine-tuning on a limited dataset. Robustness may vary across Norwegian dialects (Bokmål vs. Nynorsk), domains, and speaker conditions.
This adapter has not been extensively evaluated across all Norwegian phonemes and prosodic patterns.
Validate quality for your specific use case before production deployment.
This model is provided as-is with no official support. For supported Norwegian TTS, see our upcoming API at tosee.no.
Citation
If you use this adapter, please cite:
bibtex
1@misc{moss-tts-norwegian-lora,
2 title = {MOSS-TTS Norwegian LoRA},
3 author = {ToSee},
4 year = {2026},
5 url = {https://huggingface.co/ToSee-Norway/MOSS-TTS-Norwegian-LoRA},
6}