ModelsQwenQwen3-14B
providerQwen /

Qwen3-14B

42 DZD in 84 DZD out/ 1M tokens
Service tier pricing, in DZD per 1M tokens
TierInputOutputCached input
PriorityLearn more
64.8129.6—
34.769.2—
Prices in DZD per 1M tokens

Qwen3-14B carries 14.8 billion parameters across 40 layers, and switches between reasoning and direct answering without changing models. The switch is a tag: write /think or /no_think into a message and the mode changes on that turn, which makes deliberation a per-turn decision rather than a per-integration one. Tool calling works in both modes, which most switchable models cannot claim — so a fast-path agent is a real option rather than a compromise. Native context is 32,768 tokens, extendable to 131,072 with positional scaling, across more than a hundred languages under Apache 2.0.

PublicJSONStreamingApache-2.0
Qwen3-14B
Capabilities
ToolsReasoningStructured output
ArchitectureTransformer
Context Window40K

Qwen3-14B

Fourteen billion parameters, two modes, and a switch you write into the conversation.


/think and /no_think

The control mechanism, and it is unusual in where it lives.

Most models take a mode as a request parameter — one setting per call, decided by your code before the message is built.

This one also reads soft switches from the conversation text, and the card states they work in a user prompt or in the system message:

CODE
/no_think

Which department owns this ticket?
CODE
/think

Prove whether this retry schedule can starve a single tenant under sustained load.

That makes mode a per-turn property of the conversation rather than a per-request property of your integration. A session can answer three questions immediately, reason through the fourth, and go back to answering — inside one thread, with no routing logic and no parameter changes.

enable_thinking works as a parameter too, for the cases where your code should decide rather than the prompt.

Two things to know before relying on the switches.

They are text the model reads, so anything that sanitises or rewrites user input before it reaches the model can strip them silently.

And placing them in the system message makes the mode a property of your application, which is the safer choice when the user should not be able to change it.


Tool Calling Works in Both Modes

A capability the card names explicitly, and one most switchable models cannot claim:

precise integration with external tools in both thinking and unthinking modes

Most models that offer a fast path degrade tool use on it. Reasoning is where the model works out which tool to call and with what arguments; remove it and the calls get sloppier.

Here both are documented capabilities, which makes a two-speed agent a real design rather than a compromise.

How that plays out. Mechanical steps — read a file, check a status, list records — run in non-thinking mode at full tool reliability. The step that requires a decision switches to thinking mode. With soft switches, that is a per-turn choice inside one session.


Architecture

Total parameters14.8B
Non-embedding13.2B
Layers40
Query heads40
Key-value heads8
Native context32,768
Extended context131,072 with YaRN
Languages100+

Forty query heads against eight key-value heads — a 5:1 grouped-query ratio, cutting the key-value cache to a fifth of what full multi-head attention would need.

Forty layers at 14.8 billion parameters is a deep, conventional dense stack. No mixture of experts, no linear attention, no hybrid layout — this is the straightforward architecture in a generation that also shipped sparse ones, and that simplicity is part of why it runs everywhere.


32K Is Native. 128K Is Extension.

Worth being precise about, because the two get quoted interchangeably.

32,768 tokens is what the model was trained at.

131,072 comes from YaRN, applied at inference — a real capability, and a different thing from training at that length.

Qwen document the trade for static YaRN, which is what most serving frameworks implement: the scaling factor stays constant regardless of input length, so enabling it affects short prompts too.

The practical rule: leave the extension off unless you actually serve long inputs. Turning it on permanently to handle occasional long documents degrades every short request in between.


Specifications

Model IDQwen/Qwen3-14B
TypeCausal language model
Parameters14.8B (13.2B non-embedding)
Layers40
AttentionGQA — 40 Q heads, 8 KV heads
Native context32,768 tokens
Extended context131,072 with YaRN
ModesThinking, non-thinking
Mode controlenable_thinking, or /think · /no_think in a message
Languages100+
LicenceApache 2.0
Minimum transformers4.51.0
DeveloperQwen Team, Alibaba

Transformers below 4.51.0 raises KeyError: 'qwen3'. The architecture is recent enough that older library versions do not recognise it.

Official builds cover GGUF at five quantisations, MLX for Apple silicon, and the standard weights — an unusually complete set from the model authors rather than the community.


Capabilities

CapabilityValue
input_typestext
output_typestext
image_inputNot supported
context_window40960
reasoningTwo modes — switchable
mode_switchParameter or in-prompt soft switch
streamingSupported
tool_callingSupported in both modes
structured_outputSupported
requires_promptYes — text prompt required

Recommended Sampling

From Qwen's own reference command, and the parameter set differs by mode.

ParameterThinkingNon-thinking
temperature0.60.7
top_p0.950.80
top_k2020
min_p00
presence_penalty1.51.5

Switching mode means switching the sampling too. Temperature and top-p both change, and leaving them at the other mode's values costs quality in a way that is hard to trace back to configuration.

The presence penalty at 1.5 is high, and it appears in Qwen's reference command rather than as a suggestion. On a reasoning model, repetition inside a long trace is a real failure mode, and that value exists to suppress it.

Support varies by serving stack. top_k, min_p, and presence_penalty in particular are not universally honoured through an OpenAI-compatible interface.


What Qwen's Own Command Reveals

Their reference llama.cpp invocation is worth reading as configuration advice rather than as a snippet:

CODE
-c 40960 -n 32768 --no-context-shift

A 40,960-token context, with 32,768 of it available for generation.

Four fifths of the window reserved for output. On a model with a 32,768-token native context, that is a deliberate allocation — and it says exactly what a thinking model costs: the reasoning trace can consume the great majority of what you allocate.

Copy the proportion, not the numbers. Whatever window you configure, a thinking-mode request needs most of it available for output. A budget sized for the answer produces a trace and nothing else.

--no-context-shift is the other half. Silently dropping old tokens to make room is worse than failing, because the model keeps answering from a history that quietly lost its beginning.


Using Qwen3-14B on DEVUP AI

Base URL: https://api.devupai.com/v1 · Model ID: Qwen/Qwen3-14B

Python

PYTHON
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["DEVUP_API_KEY"],
    base_url="https://api.devupai.com/v1",
)

response = client.chat.completions.create(
    model="Qwen/Qwen3-14B",
    messages=[
        {"role": "user", "content": "Hello world!"}
    ],
    max_tokens=1024,
)

print(response.choices[0].message.content)

Node.js

JAVASCRIPT
import DevupAI from "devupai";

const client = new DevupAI({
  apiKey: process.env.DEVUP_API_KEY,
});

async function main() {
  const response = await client.chat.completions.create({
    model: "Qwen/Qwen3-14B",
    messages: [{ role: "user", content: "Hello world!" }],
    max_tokens: 1024,
  });

  console.log(response.choices[0].message.content);
}

main();

cURL

BASH
curl -X POST "https://api.devupai.com/v1/chat/completions" \
  -H "Authorization: Bearer $DEVUP_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "Qwen/Qwen3-14B",
    "messages": [
      { "role": "user", "content": "Hello world!" }
    ],
    "max_tokens": 1024
  }'

Switching Modes Mid-Conversation

The pattern the soft switches exist for, with the sampling changing alongside them.

PYTHON
conversation = []

SETTINGS = {
    True:  {"temperature": 0.6, "top_p": 0.95, "max_tokens": 16384},
    False: {"temperature": 0.7, "top_p": 0.80, "max_tokens": 1024},
}


def ask(text: str, *, think: bool) -> str:
    """Send one turn at the requested mode, switching sampling with it."""
    marker = "/think" if think else "/no_think"
    conversation.append({"role": "user", "content": f"{marker}\n\n{text}"})

    response = client.chat.completions.create(
        model="Qwen/Qwen3-14B",
        messages=conversation,
        extra_body={"top_k": 20, "min_p": 0, "presence_penalty": 1.5},
        **SETTINGS[think],
    )

    message = response.choices[0].message
    conversation.append(message)

    trace = getattr(message, "reasoning_content", None)
    print(f"[{marker}] {response.usage.completion_tokens:>6,} tokens" + (f" · {len(trace):,} reasoning chars" if trace else ""))

    return message.content


ask("List the tables in this schema.", think=False)
ask("Which of them could produce a duplicate row under concurrent inserts, and why?", think=True)
ask("Give me the CREATE INDEX statement for the fix.", think=False)

The SETTINGS table is the part worth copying. Mode and sampling change together — a single dictionary lookup rather than three parameters you might update inconsistently.

And max_tokens changes with the mode too. A one-line answer in non-thinking mode does not need sixteen thousand tokens; a reasoning turn does. Three turns, two modes, one conversation.


A Two-Speed Agent

Where tool calling in both modes becomes a design rather than a claim.

PYTHON
import json

TOOLS = [
    {
        "type": "function",
        "function": {
            "name": "read_file",
            "description": "Read a file relative to the repository root.",
            "parameters": {
                "type": "object",
                "properties": {"path": {"type": "string"}},
                "required": ["path"],
            },
        },
    },
    {
        "type": "function",
        "function": {
            "name": "run_tests",
            "description": "Run the test suite and return pass/fail counts with failure output.",
            "parameters": {"type": "object", "properties": {}},
        },
    },
]


def read_file(path: str) -> dict:
    """Replace with your real, sandboxed file access."""
    raise NotImplementedError


def run_tests() -> dict:
    """Replace with your real, sandboxed test runner."""
    raise NotImplementedError


HANDLERS = {"read_file": read_file, "run_tests": run_tests}

session = [
    {
        "role": "system",
        "content": (
            "/no_think\n\n"
            "You are working inside a git repository. Make the smallest change that fixes the "
            "problem and run the tests after each edit. When a test failure is not obviously "
            "explained by your last change, say so and stop — a human will take over."
        ),
    },
    {"role": "user", "content": "The DZD invoice test fails on totals ending in .005. Fix it."},
]

CEILING = 30

for step in range(CEILING):
    response = client.chat.completions.create(
        model="Qwen/Qwen3-14B",
        messages=session,
        tools=TOOLS,
        temperature=0.7,
        top_p=0.80,
        max_tokens=4096,
    )

    message = response.choices[0].message
    session.append(message)

    if not message.tool_calls:
        print(message.content)
        break

    for call in message.tool_calls:
        handler = HANDLERS.get(call.function.name)
        if handler is None:
            outcome = {"error": "unknown tool", "name": call.function.name}
        else:
            try:
                outcome = handler(**json.loads(call.function.arguments or "{}"))
            except Exception as exc:
                outcome = {"error": type(exc).__name__, "detail": str(exc)}

        session.append({"role": "tool", "tool_call_id": call.id, "content": json.dumps(outcome)})
else:
    print(f"Stopped at the {CEILING}-step ceiling.")

The switch is in the system message, which makes non-thinking the property of the loop rather than something a tool result could change.

The whole loop runs fast, and the escape hatch is the stop condition rather than a mode change — "say so and stop" hands an unclear failure to a person instead of having a fast-path model guess at it.

If you want the model to escalate itself, append a /think user turn when a step fails twice and let it reason through that one before continuing.


Reading the Reasoning

PYTHON
message = response.choices[0].message

trace = getattr(message, "reasoning_content", None)
if trace:
    logger.debug("reasoning: %d characters", len(trace))

print(message.content)

Keep the fields apart in both directions. In thinking mode the trace is substantial; merging it into the answer breaks parsing and shows readers working notes.

Check finish_reason. Reasoning shares the output budget, and on a 32,768-token native window that budget is tighter than it looks — a truncated response can contain a full trace and no answer.


Self-Hosting

Transformers 4.51.0 minimum, or the model class is not found.

Official builds across three formats — standard weights, GGUF at q4_K_M, q5_0, q5_K_M, q6_K, and q8_0, and MLX for Apple silicon. Published by Qwen rather than converted by the community, which is uncommon at this size.

One command through Ollama using the official GGUF repository, if you want the shortest path to a local instance.

Qwen-Agent is the recommended agent framework, and the reason is practical: it encapsulates tool-calling templates and parsers internally, which removes the class of silent failure where a parser mismatch turns tool calls into prose.

Set --no-context-shift or its equivalent. Silent truncation of old context is worse than an error.


Where It Fits

Mixed workloads in one integration. A pipeline with mechanical steps and hard decisions, served by one model identifier and two modes.

Two-speed agents, with tool calling documented on both sides.

Local and on-device deployment — fourteen billion parameters with official GGUF and MLX builds puts it on a consumer card or a Mac.

Multilingual work across 100+ languages and dialects, with translation named as a strength.

Interactive assistants, running non-thinking by default and escalating per turn.

Creative and conversational work, which the card names specifically: role-play, multi-turn dialogue, and human preference alignment.

Less suited to long-document work beyond 32K without measuring the extension, and to image input, which it does not accept.


Practical Notes

Change sampling when you change mode. Temperature and top-p both differ.

Reserve most of your token budget for output in thinking mode — Qwen's own command reserves four fifths.

Put soft switches in the system message when the mode is your application's decision, not the user's.

Verify soft switches survive any input sanitisation in your stack.

Leave YaRN off unless you serve long inputs — static scaling affects short prompts too.

Use Qwen's published presence penalty; repetition in a long trace is a real failure mode.

Check finish_reason on thinking-mode requests.

Disable context shifting so truncation fails loudly rather than silently.


Limitations

Native context is 32,768. The 131,072 figure comes from positional extension, and static YaRN degrades short prompts when left enabled.

Text only. No image, audio, or video input.

Soft switches are prompt text — vulnerable to input rewriting, and visible to the user if placed in a user turn.

Thinking mode consumes output tokens that non-thinking does not, against a window that is modest by current standards.

Sampling parameter support varies by serving stack. top_k, min_p, and presence_penalty are not universally available.

Transformers 4.51.0 or later is required for self-hosting.

Fourteen billion parameters. Strong for its size and not a frontier model — the larger members of this generation exist for work where that matters.

Reasoning traces are working notes. Unpolished, sometimes exploring abandoned branches, and occasionally contradicting the answer that follows.