Tongyi
Qwen

Qwen 1.5 4B

qwen/qwen-4b

Qwen1.5 4B is the beta version of Qwen2, a transformer-based decoder-only language model pretrained on a large amount of data. In comparison with the previous released Qwen, the improvements include:

  • Significant performance improvement in human preference for chat models
  • Multilingual support of both base and chat models
  • Stable support of 32K context length for models of all sizes

For more details, see this blog post and GitHub repo.

Usage of this model is subject to Tongyi Qianwen LICENSE AGREEMENT.

Community

Open Source

Context Window

32,768

0

Using Qwen 1.5 4B with Python API

Using Qwen 1.5 4B with OpenAI compatible API

import openai

client = openai.Client(
  api_key= '{your_api_key}',
  base_url="https://api.model.box/v1",
)
response = client.chat.completions.create(
model="qwen/qwen-4b",
messages: [
  {
    role: 'user',
    content:
      'introduce your self',
    },
  ]
)
print(response)