Qwen 模型

Vertex AI 上的 Qwen 模型以 API 形式提供全代管式无服务器模型。如需在 Vertex AI 上使用 Qwen 模型,请直接向 Vertex AI API 端点发送请求。由于 Qwen 模型使用托管式 API,因此无需预配或管理基础设施。

您可以流式传输回答,以降低最终用户对延迟时间的感知度。流式回答使用服务器发送的事件 (SSE) 来逐步流式传输回答。

可用的 Qwen 模型

Qwen 提供了以下模型,可在 Vertex AI 中使用。如需访问 Qwen 模型,请前往其 Model Garden 模型卡片。

Qwen3 Coder (Qwen3 Coder)

Qwen3 Coder (Qwen3 Coder) 是一款大规模的开放权重模型,专为高级软件开发任务而开发。该模型的主要特点是上下文窗口大,因此能够全面处理和理解大型代码库。

前往 Qwen3 Coder 模型卡片

Qwen3 235B (Qwen3 235B)

Qwen3 235B (Qwen3 235B) 是一款大型 235B 参数模型。该模型以其“混合思维”能力而著称,可让用户在有条不紊的逐步“思考”模式(用于处理数学推理和编码等复杂任务)和快速“非思考”模式(用于进行一般用途的对话)之间动态切换。其大上下文窗口使其适合需要深度推理和长篇理解的应用场景。

前往 Qwen3 235B 模型卡片

准备工作

如需将 Qwen 模型与 Vertex AI 搭配使用,您必须执行以下步骤。必须启用 Vertex AI API (aiplatform.googleapis.com) 才能使用 Vertex AI。如果您已有启用了 Vertex AI API 的项目,则可以使用该项目,而无需创建新项目。

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Enable the Vertex AI API.

    Enable the API

  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  6. Verify that billing is enabled for your Google Cloud project.

  7. Enable the Vertex AI API.

    Enable the API

  8. 前往以下 Model Garden 模型卡片之一,然后点击启用