Qwen 3
- Vendor
- Alibaba
- Parameters
- 14B
- Size
- 27.5 GB
$ brew install mirai$ mirai --model Qwen/Qwen3-14BIntegrate with SDK
https://github.com/trymirai/uzu-swift
| 1 | import Foundation |
| 2 | import Uzu |
| 3 | |
| 4 | public func runChat() async throws { |
| 5 | let engineConfig = EngineConfig.create() |
| 6 | let engine = try await Engine.create(config: engineConfig) |
| 7 | |
| 8 | guard let model = try await engine.model(identifier: "alibaba:qwen3.5:0.8b:mirai:mirai-m:4") else { |
| 9 | return |
| 10 | } |
| 11 | for try await update in try await engine.download(model: model).iterator() { |
| 12 | print(String(format: "\r\u{001B}[2KDownload progress: %.2f%%", update.progress() * 100), terminator: "") |
| 13 | fflush(stdout) |
| 14 | } |
| 15 | print() |
| 16 | |
| 17 | let messages = [ |
| 18 | ChatMessage.system().withText(text: "You are a helpful assistant"), |
| 19 | ChatMessage.user().withText(text: "Tell me a short, funny story about a robot") |
| 20 | ] |
| 21 | let session = try await engine.chat(model: model, config: .create()) |
| 22 | let stream = await session.replyWithStream(input: messages, config: .create()) |
| 23 | var message: ChatMessage? = nil |
| 24 | for try await update in stream.iterator() { |
| 25 | switch update { |
| 26 | case .replies(let replies): |
| 27 | let reply = replies.last |
| 28 | message = reply?.message |
| 29 | print("Generated tokens: \(reply?.stats.tokensCountOutput ?? 0)") |
| 30 | case .error(let error): |
| 31 | print("Error: \(error)") |
| 32 | } |
| 33 | } |
| 34 | print("Reasoning: \(message?.reasoning() ?? "empty")") |
| 35 | print("Text: \(message?.text() ?? "empty")") |
| 36 | } |
| 37 | |
Details
Qwen3-14B is a 14.8-billion parameter causal language model from Alibaba's Qwen team, representing the latest generation in the Qwen series. It introduces a distinctive dual-mode architecture that allows seamless switching between a thinking mode — designed for complex reasoning tasks like math, coding, and logic — and a non-thinking mode for efficient, general-purpose conversation.
Architecture & Specifications
- Parameters: 14.8B total (13.2B non-embedding)
- Layers: 40, with Grouped Query Attention (40 Q heads, 8 KV heads)
- Context Length: 32,768 tokens natively; up to 131,072 tokens via YaRN RoPE scaling
- Base Model: Qwen3-14B-Base, with both pretraining and post-training stages
- License: Apache 2.0
Key Capabilities
Dual Reasoning Modes. The model's thinking mode wraps internal chain-of-thought reasoning inside `<think>...</think>` blocks before delivering a final answer, surpassing previous QwQ models on mathematical and code-generation benchmarks. Non-thinking mode mirrors the behavior of Qwen2.5-Instruct for fast, direct responses. Users can toggle modes via a simple `enable_thinking` flag or inline `/think` and `/no_think` commands within conversation turns.
Agentic & Tool Use. Qwen3-14B excels at structured tool calling and integration with external services, including MCP-based tool configurations. It achieves leading performance among open-source models on complex agent-based tasks.
Multilingual Breadth. The model supports over 100 languages and dialects, with strong multilingual instruction-following and translation capabilities.
Human Preference Alignment. Post-training emphasizes creative writing, role-playing, multi-turn dialogue, and precise instruction following, resulting in a natural and engaging conversational style.
Ideal Use Cases
- Complex reasoning, math problem-solving, and code generation (thinking mode)
- Conversational assistants and chatbots requiring low latency (non-thinking mode)
- Agentic workflows with external tool integration
- Multilingual applications and translation pipelines
Qwen3-14B is compatible with Hugging Face Transformers, vLLM, SGLang, Ollama, llama.cpp, and other major inference frameworks.