# Source: https://docs.baseten.co/examples/models/qwen/qwen-2-5-32b-coder-instruct.md

> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baseten.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Qwen-2-5-32B-Coder-Instruct

> Qwen 2.5 32B Coder is an OpenAI-compatible model and can be called using the OpenAI SDK in any language.

export const QwenIconCard = ({title, href}) => <Card title={title} href={href} icon={<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.604 1.33998C12.997 2.02998 13.388 2.72198 13.778 3.41498C13.7938 3.4427 13.8166 3.46573 13.8442 3.48171C13.8718 3.4977 13.9031 3.50608 13.935 3.50598H19.487C19.661 3.50598 19.809 3.61598 19.933 3.83298L21.387 6.40298C21.577 6.73998 21.627 6.88098 21.411 7.23998C21.151 7.66998 20.898 8.10398 20.651 8.53998L20.284 9.19798C20.178 9.39398 20.061 9.47798 20.244 9.70998L22.896 14.347C23.068 14.648 23.007 14.841 22.853 15.117C22.416 15.902 21.971 16.681 21.518 17.457C21.359 17.729 21.166 17.832 20.838 17.827C20.061 17.811 19.286 17.817 18.511 17.843C18.4944 17.8438 18.4783 17.8489 18.4641 17.8576C18.4499 17.8663 18.4382 17.8785 18.43 17.893C17.5358 19.4773 16.6342 21.0573 15.725 22.633C15.556 22.926 15.345 22.996 15 22.997C14.003 23 12.998 23.001 11.983 22.999C11.8885 22.9987 11.7957 22.9735 11.7141 22.9259C11.6325 22.8784 11.5648 22.8101 11.518 22.728L10.183 20.405C10.1752 20.3898 10.1633 20.3771 10.1486 20.3684C10.1339 20.3598 10.1171 20.3554 10.1 20.356H4.982C4.697 20.386 4.429 20.355 4.177 20.264L2.574 17.494C2.52659 17.412 2.50146 17.319 2.50111 17.2243C2.50076 17.1295 2.5252 17.0363 2.572 16.954L3.779 14.834C3.79619 14.804 3.80524 14.77 3.80524 14.7355C3.80524 14.7009 3.79619 14.667 3.779 14.637C3.15027 13.5485 2.52526 12.4578 1.904 11.365L1.114 9.96998C0.954 9.65998 0.941 9.47398 1.209 9.00498C1.674 8.19198 2.136 7.37998 2.596 6.56898C2.728 6.33498 2.9 6.23498 3.18 6.23398C4.04299 6.23035 4.906 6.23001 5.769 6.23298C5.7908 6.23281 5.81217 6.2269 5.83095 6.21584C5.84974 6.20478 5.86528 6.18896 5.876 6.16998L8.682 1.27498C8.72452 1.20052 8.78592 1.13857 8.86 1.09538C8.93409 1.0522 9.01825 1.02929 9.104 1.02898C9.628 1.02798 10.157 1.02898 10.687 1.02298L11.704 0.999982C12.045 0.996982 12.428 1.03198 12.604 1.33998ZM9.172 1.74298C9.16146 1.74298 9.15111 1.74574 9.14198 1.75101C9.13285 1.75628 9.12527 1.76386 9.12 1.77298L6.254 6.78798C6.24024 6.81162 6.22054 6.83124 6.19687 6.84493C6.17319 6.85861 6.14635 6.86587 6.119 6.86598H3.253C3.197 6.86598 3.183 6.89098 3.212 6.93998L9.022 17.096C9.047 17.138 9.035 17.158 8.988 17.159L6.193 17.174C6.15214 17.1726 6.11172 17.1828 6.07635 17.2033C6.04099 17.2238 6.0121 17.2538 5.993 17.29L4.673 19.6C4.629 19.678 4.652 19.718 4.741 19.718L10.457 19.726C10.503 19.726 10.537 19.746 10.561 19.787L11.964 22.241C12.01 22.322 12.056 22.323 12.103 22.241L17.109 13.481L17.892 12.099C17.8968 12.0904 17.9037 12.0833 17.9122 12.0784C17.9206 12.0734 17.9302 12.0708 17.94 12.0708C17.9498 12.0708 17.9594 12.0734 17.9678 12.0784C17.9763 12.0833 17.9832 12.0904 17.988 12.099L19.412 14.629C19.4227 14.6479 19.4382 14.6636 19.4571 14.6745C19.4759 14.6854 19.4973 14.6911 19.519 14.691L22.282 14.671C22.2891 14.671 22.2961 14.6692 22.3022 14.6657C22.3083 14.6622 22.3135 14.6571 22.317 14.651C22.3204 14.6449 22.3222 14.638 22.3222 14.631C22.3222 14.624 22.3204 14.6171 22.317 14.611L19.417 9.52498C19.4066 9.50798 19.401 9.48843 19.401 9.46848C19.401 9.44854 19.4066 9.42898 19.417 9.41198L19.71 8.90498L20.83 6.92798C20.854 6.88698 20.842 6.86598 20.795 6.86598H9.2C9.141 6.86598 9.127 6.83998 9.157 6.78898L10.591 4.28398C10.6017 4.26691 10.6074 4.24715 10.6074 4.22698C10.6074 4.20681 10.6017 4.18705 10.591 4.16998L9.225 1.77398C9.21978 1.76452 9.21209 1.75665 9.20276 1.75119C9.19344 1.74573 9.18281 1.7429 9.172 1.74298ZM15.462 9.76298C15.508 9.76298 15.52 9.78298 15.496 9.82298L14.664 11.288L12.051 15.873C12.0461 15.8819 12.0388 15.8893 12.03 15.8944C12.0212 15.8995 12.0112 15.9022 12.001 15.902C11.9909 15.9019 11.9809 15.8992 11.9721 15.8942C11.9634 15.8891 11.9561 15.8818 11.951 15.873L8.498 9.84098C8.478 9.80698 8.488 9.78898 8.526 9.78698L8.742 9.77498L15.464 9.76298H15.462Z" fill="url(#paint0_linear_631_10870)" />
<defs>
<linearGradient id="paint0_linear_631_10870" x1="0.999512" y1="0.999817" x2="2201.03" y2="0.999817" gradientUnits="userSpaceOnUse">
<stop stop-color="#00055F" stop-opacity="0.84" />
<stop offset="1" stop-color="#6F69F7" stop-opacity="0.84" />
</linearGradient>
</defs>
</svg>} horizontal />;

<QwenIconCard title="Deploy Qwen 2.5 32B Coder Instruct" href="https://app.baseten.co/deploy/qwen-2-5-32b-coder-instruct" />

## Example usage

```python  theme={"system"}
from openai import OpenAI
import os

model_url = "" # Copy in from API pane in Baseten model dashboard

client = OpenAI(
    api_key=os.environ['BASETEN_API_KEY'],
    base_url=model_url
)

# Chat completion
response_chat = client.chat.completions.create(
    model="",
    messages=[
        {"role": "user", "content": "Tell me a fun fact about Python."}
    ],
    temperature=0.3,
    max_tokens=100,
)
print(response_chat)
```

## JSON output

```json  theme={"system"}
{
  "id": "143",
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "logprobs": null,
      "message": {
        "content": "[Model output here]",
        "role": "assistant",
        "audio": null,
        "function_call": null,
        "tool_calls": null
      }
    }
  ],
  "created": 1741224586,
  "model": "",
  "object": "chat.completion",
  "service_tier": null,
  "system_fingerprint": null,
  "usage": {
    "completion_tokens": 145,
    "prompt_tokens": 38,
    "total_tokens": 183,
    "completion_tokens_details": null,
    "prompt_tokens_details": null
  }
}
```