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

# Demo DeepSeek Qwen

> Enable reasoning on Qwen 2.5 32B with DeepSeek R1 Distill Qwen as the reasoning model.

<Warning>
  Groq retired the source's `Qwen-2.5-32b` model in April 2025. Replace it with `qwen/qwen3.6-27b`. Groq retired the source's `Deepseek-r1-distill-qwen-32b` model in April 2025. Replace it with `qwen/qwen3.6-27b`. See [Groq deprecations](https://console.groq.com/docs/deprecations).
</Warning>

```python demo_deepseek_qwen.py theme={null}
"""Run `uv pip install ddgs sqlalchemy pgvector pypdf openai groq` to install dependencies."""

from agno.agent import Agent
from agno.models.groq import Groq

# ---------------------------------------------------------------------------
# Create Agent
# ---------------------------------------------------------------------------

agent_with_reasoning = Agent(
    model=Groq(id="Qwen-2.5-32b"),
    reasoning=True,
    reasoning_model=Groq(
        id="Deepseek-r1-distill-qwen-32b", temperature=0.6, max_tokens=1024, top_p=0.95
    ),
)
agent_with_reasoning.print_response("9.11 and 9.9 -- which is bigger?", markdown=True)

# ---------------------------------------------------------------------------
# Run Agent
# ---------------------------------------------------------------------------

if __name__ == "__main__":
    pass
```

## Run the Example

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U agno groq
    ```
  </Step>

  <Step title="Export your Groq API key">
    <CodeGroup>
      ```bash Mac/Linux theme={null}
      export GROQ_API_KEY="your_groq_api_key_here"
      ```

      ```bash Windows theme={null}
      $Env:GROQ_API_KEY="your_groq_api_key_here"
      ```
    </CodeGroup>
  </Step>

  <Step title="Replace Qwen 2.5 32B">
    Replace `Qwen-2.5-32b` with `qwen/qwen3.6-27b` in the saved file.
  </Step>

  <Step title="Replace DeepSeek Qwen Distill">
    Replace `Deepseek-r1-distill-qwen-32b` with `qwen/qwen3.6-27b` in the saved file.
  </Step>

  <Step title="Run the example">
    Save the code above as `demo_deepseek_qwen.py`, then run:

    ```bash theme={null}
    python demo_deepseek_qwen.py
    ```
  </Step>
</Steps>

Full source: [cookbook/90\_models/groq/reasoning/demo\_deepseek\_qwen.py](https://github.com/agno-agi/agno/blob/main/cookbook/90_models/groq/reasoning/demo_deepseek_qwen.py)
