Since the backbone LLM (Qwen3-4B-Instruct) natively supports tool use, Sori can understand spoken Korean and trigger tool calls -- even at Stage 1 with a frozen LLM.
python
1SYSTEM_PROMPT ="""You are a helpful voice assistant that can understand Korean speech and respond helpfully.
2When the user asks a question, answer it directly. If you need external information, use the available tools.
34# Tools
56## get_weather
7Get current weather information for a city.
8Parameters:
9- city (string, required): The city name (e.g. "서울", "부산")
1011## search_web
12Search the web for information.
13Parameters:
14- query (string, required): The search query
1516To use a tool, respond with:
17<tool_call>
18{"name": "tool_name", "arguments": {"param": "value"}}
19</tool_call>
20"""2122conversation =[23{"role":"system","content": SYSTEM_PROMPT},24{"role":"user","content":[25{"type":"audio","audio":"weather.mp3"},# "혹시 지금 서울 날씨가 어떻게돼?"26]},27]2829# ... same inference code as above ...
Output:
You seem to be asking about the current weather in Seoul. Let me check that for you.
<tool_call>
{"name": "get_weather", "arguments": {"city": "서울"}}
</tool_call>
The model correctly understands the spoken Korean question about Seoul's weather and generates the appropriate get_weather tool call. See inference_if.py for the full example.
Sample Results (Stage 1, Step 6000)
Expected
Predicted
먼저 코로나 확진자 현황부터 짚어보죠.
먼저 코로나 확진자 현황부터 집히 보죠.
네 안녕하세요.
네 안녕하세요?
문의드릴 게 있어서 전화 드렸어요.
이렇게 들을게 있어서 전화 드렸어요.
네 고객님 혹시 개명 전 이름과 전화번호 말씀 부탁드립니다
네, 고객님 혹시 개명 전 이름과 전화번호 말씀 부탁드립니다.
This is a Stage 1 (alignment only) checkpoint where only the 12M audio_proj MLP was trained. The LLM is frozen. Stage 2 (LoRA fine-tuning) will improve accuracy significantly.
Training
Two-Stage Approach
Following LLaVA and Qwen3-Omni's methodology:
Stage 1 - Alignment (this release): Train only audio_proj to map audio features into the LLM's embedding space.
Setting
Value
Trainable params
audio_proj only (12M / 4.7B = 0.25%)
Audio Encoder
Frozen
LLM
Frozen
Learning rate
1e-4
Effective batch size
1024 (8 x 8 GPUs x 16 accum)
Loss
Cross-entropy with label masking
Steps
6,000
Hardware
8x H100 80GB
Stage 2 - Fine-tuning (planned): Unfreeze LLM with LoRA (r=16, alpha=32) + continue training audio_proj.
Steps 0-2500: Loss plateaus around 3.0 as audio_proj learns initial mapping
Steps 2500+: Sharp drop to ~1.0 as alignment clicks into place; transcription quality jumps dramatically
Key Technical Detail
The mel spectrogram must match Qwen3-Omni's WhisperFeatureExtractor exactly (Slaney mel scale + log10 + normalization). Using torchaudio defaults (HTK scale + natural log) produces completely wrong features for the pretrained AuT encoder - this was the root cause of initial training failure.