Apertus-8B Swiss Insurance (search & quote)
An adaptation of swiss-ai/Apertus-8B-2509 to Swiss private
insurance law, in German and French. Built for HackApertus, Track 1B (Swiss Voices / Core Task Intelligence).
How it was trained
- Continued pretraining, 2 epochs, full weights: about 44k segments of Swiss insurance law sources (Fedlex federal law, Federal Supreme Court decisions) mixed with general French text, so that general language ability is kept.
- Supervised fine-tuning, 2 epochs: about 18k conversations that teach the model to plan, search the web when it needs a source, and answer with quotes from the sources it found.
How to use it
The model uses the Apertus chat template shipped in this repository. When it needs a source it emits one web-search call:
<|tools_prefix|>[{"web_search": {"query": "..."}}]<|tools_suffix|>
Run the search, give the results back as a tool message, and let the model continue. It answers once it has enough sources. Without a search tool, it answers from what it learned.
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("legmlai/apertus-8b-swiss-insurance")
model = AutoModelForCausalLM.from_pretrained("legmlai/apertus-8b-swiss-insurance", torch_dtype="bfloat16", device_map="auto")
Evaluation
300 held-out questions (150 German, 150 French), compared against swiss-ai/Apertus-8B-Instruct-2509 with the same
search tool:
- questions:
legmlai/swiss-insurance-eval - answers of both models:
legmlai/swiss-insurance-eval-responses - code and scores: https://github.com/legml-ai/apertus-domain-transfer
Limits
This model is not legal advice. It can be wrong or out of date. Check every answer against the cited source.
License
Apache 2.0, like the base model. Use is also subject to the Apertus Acceptable Use Policy (USAGE_POLICY.md).
- Downloads last month
- 14