Dedicated Endpoints
Run this model inference on single tenant GPU with unmatched speed and reliability at scale.
Container
Run this model inference with full control and performance in your environment.
Get help setting up a custom Dedicated Endpoints.
Talk with our engineer to get a quote for reserved GPU instances with discounts.
README
License: apache-2.0Chat template
This model uses the following chat template:
markdown
<|im_start|>systemTu es un assistant spécialisé dans la correction de transcriptions médicales.<|im_end|><|im_start|>user{input}<|im_end|><|im_start|>assistant
Usage
Quick start
python
from transformers import AutoModelForCausalLM, AutoTokenizermodel_id = "PraxySante/Qwen3-0.6B-SFT-ASR-Correction-FR-v6"tokenizer = AutoTokenizer.from_pretrained(model_id)model = AutoModelForCausalLM.from_pretrained(model_id,torch_dtype="auto",device_map="auto",)input_text = "mais la fille c'est pis carme maison chez nous de table à table c'est fini"messages = [{"role": "system", "content": "Tu es un assistant spécialisé dans la correction de transcriptions médicales."},{"role": "user", "content": input_text},]prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)inputs = tokenizer(prompt, return_tensors="pt").to(model.device)outputs = model.generate(**inputs,max_new_tokens=256,temperature=0.1,do_sample=True,top_p=0.9,)response = tokenizer.decode(outputs[0], skip_special_tokens=True)print(response)
Input preprocessing
Before feeding text to the model, you should normalize numbers, medications, units and abbreviations:
python
import re# Normalize numbers: 2 -> <num>deux</num>NUM_MAP = {"0": "zéro", "1": "un", "2": "deux", "3": "trois", "4": "quatre","5": "cinq", "6": "six", "7": "sept", "8": "huit", "9": "neuf","10": "dix"}def normalize_numbers(text):def repl(m):num = m.group(0)if num in NUM_MAP:return f"<num>{NUM_MAP[num]}</num>"return numreturn re.sub(r'\b\d{1,2}\b', repl, text)# Normalize medicationsdef normalize_medications(text):# Add known medication namesmeds = ["dalacine", "norfloxacine", "amoxicilline", "paracétamol"]for m in meds:text = re.sub(rf'\b{re.escape(m)}\b', f'<med>{m}</med>', text, flags=re.IGNORECASE)return text# Normalize unitsdef normalize_units(text):units = {"mg": "milligramme", "ml": "millilitre", "g": "gramme"}for short, long in units.items():text = re.sub(rf'\b{re.escape(short)}\b', f'<unit>{long}</unit>', text, flags=re.IGNORECASE)return text# Normalize abbreviationsdef normalize_abbreviations(text):abbrevs = {"ml": "millilitre"}for short, long in abbrevs.items():text = re.sub(rf'\b{re.escape(short)}\b', f'<abbrev>{long}</abbrev>', text, flags=re.IGNORECASE)return text
Training details
- Base model: Qwen3-0.6B
- Dataset: PraxySante/Qwen3-0.6B-SFT-ASR-Correction-FR-vf-train-clean
- Method: SFT with LoRA
- Steps: 35,000 (ongoing)
- Loss: ~0.70
Files
scripts/— normalization and inference scriptsinference_params.py— recommended generation parameters
Model provider
PraxySante
Model tree
Base
this model
Modalities
Input
Text
Output
Text
Pricing
Dedicated Endpoints
View detailsSupported Functionality
Model APIs
Dedicated Endpoints
Container
More information