Run this model with HF Jobs

Run JJukic22/Apertus-CSS-8B-V2 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 to fine-tune https://huggingface.co/JJukic22/Apertus-CSS-8B-V2. 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/JJukic22/Apertus-CSS-8B-V2 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.

Configuration Parsing Warning:In adapter_config.json: "peft.task_type" must be a string

Apertus-CSS-8B-V2

Swiss German Multimodal Insurance Assistant

Apertus-CSS-8B-V2 is a multimodal LoRA adapter developed for a CSS health insurance hackathon.

The project explores sovereign AI infrastructure, Swiss German speech understanding, regional dialect recognition, grounded insurance question answering, and dialect-aware response generation.

Built on Swiss AI's Apertus foundation model and fine-tuned on the CSCS Clariden supercomputer.

Highlights

  • 70.8% relative reduction in transcription WER
  • 86.0% relative reduction in transcription CER
  • 57.3% relative reduction in normalization WER
  • Dialect classification improved from 20% to 76%
  • 52.4% reduction in multi-task validation loss
  • Compact 53 MB LoRA adapter
  • No external language model required by the adapter

All performance results refer to the synthetic validation dataset, not independent real-speaker data.

Model Details

Property Value
Base model swiss-ai/Apertus-v1.5-8B-SFT
Base revision 7249aa827c177f6a23d839cad3e14d5b42ec0223
Architecture Apertus 1.5 8B Multimodal
Fine-tuning method Multi-task LoRA SFT
Adapter size Approximately 53 MB
Trainable parameters Approximately 13.63 million
Infrastructure CSCS Clariden
Accelerator NVIDIA GH200
Framework PyTorch, Transformers, PEFT
Training precision BF16 base, FP32 trainable parameters
Audio encoder Frozen
Development status Experimental hackathon prototype

Supported Tasks

  1. Audio transcription
  2. Swiss German dialect classification
  3. Audio normalization into Standard German
  4. Text-based grounded question answering
  5. Regional dialect response generation

Supported Training Varieties

Language variety Label
Standard German de
Basel German basel
Aargau German aargau
Bern German bern
Zurich German zuerich

Valais German, Central Swiss German, French and Italian were not included in this adapter's training dataset.

Training Dataset

Dataset: https://huggingface.co/datasets/Don69andrea/css-dialekt-trainingsdaten

Dataset revision: 8f2fca129bdeadc498d9b6bbcaec86c9a73b3b20

Task Training Validation
Audio transcription 400 50
Dialect classification 400 50
Audio normalization 400 50
Text grounded QA 400 50
Dialect translation 320 40
Total 1920 240

The dataset contains synthetic Piper recordings and synthetic insurance-related dialogues.

Training and validation are separated by semantic group identifiers and audio file hashes.

However, synthetic voice identities overlap across the dataset splits. Therefore, dialect classification results may partly reflect voice recognition rather than generalizable dialect recognition.

Reference transcriptions and generated dialogues have not been fully verified by human reviewers.

Training Configuration

Hyperparameter Value
Epochs 3
LoRA rank 32
LoRA alpha 64
LoRA dropout 0.05
Learning rate 5e-5
Gradient accumulation 8
Optimizer AdamW
Weight decay 0.01
Scheduler Cosine
Warmup steps 36
Optimizer steps 720
Gradient clipping 1.0
Random seed 42
Target modules q_proj, v_proj

Training Results

Checkpoint Validation loss
Base model 1.187071
Epoch 1 0.650129
Epoch 2 0.576147
Epoch 3 0.564734

Best checkpoint: Epoch 3.

Relative validation loss reduction: 52.4%.

Measured training loop duration: 950.25 seconds, including epoch validation and checkpoint saving.

Peak allocated GPU memory: 23.71 GiB.

Evaluation Results

Base Model vs. V1 vs. V2

Metric Base V1 V2
Transcription WER 172.21% 89.83% 50.25%
Transcription CER 151.47% 67.56% 21.14%
Normalization WER 99.88% 72.17% 42.61%
Normalization CER 82.09% 53.92% 24.14%
Dialect classification accuracy 20% 20% 76%
Transcription token-limit hits 6/50 0/50 0/50

Lower WER and CER indicate better agreement with the reference text. Values above 100% are possible because of insertion errors and repetitions.

Dialect Classification

Variety Base V2
Standard German 100% 90%
Basel 0% 70%
Aargau 0% 60%
Bern 0% 100%
Zurich 0% 60%
Overall 20% 76%

Each variety was evaluated on 10 synthetic recordings.

Transcription Performance

Variety V2 WER V2 CER
Standard German 15.53% 7.49%
Basel 65.22% 26.60%
Aargau 55.56% 26.76%
Bern 58.39% 21.93%
Zurich 56.52% 23.88%

Swiss German orthographic variation may influence WER and CER. Its contribution has not been quantified.

Generation Latency

Measured on NVIDIA GH200:

Task Mean generation latency
Dialect classification 0.20 s
Audio normalization 1.81 s
Audio transcription 2.03 s

These measurements exclude complete voicebot pipeline overhead, retrieval and speech synthesis.

Usage

This repository contains LoRA adapter weights, not the complete Apertus base model.

The original multimodal Apertus model and a compatible Transformers implementation are required.

Install the Transformers revision used during training:

pip install "transformers[torch,vision,audio] @ git+https://github.com/swiss-ai/transformers.git@3797303dda74844e3d1f8977ff5518bb91f818b4"
pip install peft accelerate soundfile

Load the model and adapter:

from transformers import (
    AutoModelForMultimodalLM,
    AutoProcessor,
)
from peft import PeftModel

base_id = "swiss-ai/Apertus-v1.5-8B-SFT"
adapter_id = "JJukic22/Apertus-CSS-8B-V2"
revision = "7249aa827c177f6a23d839cad3e14d5b42ec0223"

processor = AutoProcessor.from_pretrained(
    base_id,
    revision=revision,
)

base = AutoModelForMultimodalLM.from_pretrained(
    base_id,
    revision=revision,
    dtype="auto",
    device_map={"": 0},
)

model = PeftModel.from_pretrained(
    base,
    adapter_id,
).eval()

Access to the base model and private adapter repository may require Hugging Face authentication.

Intended Voicebot Architecture

Audio input -> Apertus audio understanding -> Dialect detection and normalization -> User confirmation of ambiguous information -> Insurance knowledge retrieval -> Deterministic cost calculator -> Apertus grounded answer generation -> Regional dialect formulation -> Safety and factual validation -> Customer response

The retrieval system, cost calculator, dialect lexicon and guardrails are separate application components and are not contained in these weights.

Limitations and Responsible Use

  • Evaluation uses synthetic validation recordings.
  • Independent real-speaker generalization is unverified.
  • Synthetic voice identities overlap across splits.
  • Swiss German transcription remains error-prone.
  • Regional dialect authenticity is not fully validated.
  • Grounded insurance answer accuracy requires independent end-to-end evaluation.
  • Financial calculations must be performed by deterministic application logic.
  • The model must not be used for medical diagnosis or binding insurance decisions.
  • Ambiguous numbers and customer information require confirmation.
  • The model is not approved for production customer service.
  • Training data and speech synthesis licensing require further review.

License and Distribution

The underlying base model retains its original license and applicable access conditions.

Training data and synthetic voice redistribution rights are pending review.

No additional license grant is asserted for this adapter until that review is completed.

This repository is intended to remain private until applicable distribution rights are confirmed.

Acknowledgements

  • Swiss AI Initiative
  • Apertus development team
  • Swiss National Supercomputing Centre (CSCS)
  • CSS Hackathon
  • Hugging Face
  • PyTorch and PEFT communities

These acknowledgements do not imply official endorsement or production certification.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for JJukic22/Apertus-CSS-8B-V2

Adapter
(1)
this model

Dataset used to train JJukic22/Apertus-CSS-8B-V2