



const { OpenAI } = require('openai');
const api = new OpenAI({
baseURL: 'https://api.ai.cc/v1',
apiKey: '',
});
const main = async () => {
const result = await api.chat.completions.create({
model: 'Qwen/Qwen2-1.5B-Instruct',
messages: [
{
role: 'system',
content: 'You are an AI assistant who knows everything.',
},
{
role: 'user',
content: 'Tell me, why is the sky blue?'
}
],
});
const message = result.choices[0].message.content;
console.log(`Assistant: ${message}`);
};
main();
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.ai.cc/v1",
api_key="",
)
response = client.chat.completions.create(
model="Qwen/Qwen2-1.5B-Instruct",
messages=[
{
"role": "system",
"content": "You are an AI assistant who knows everything.",
},
{
"role": "user",
"content": "Tell me, why is the sky blue?"
},
],
)
message = response.choices[0].message.content
print(f"Assistant: {message}")
-
AI Playground

Test all API models in the sandbox environment before you integrate.
We provide more than 300 models to integrate into your app.


Product Detail
✨ Qwen2 1.5B Instruct: A Compact & Powerful Language Model
Introducing Qwen2 1.5B Instruct, a state-of-the-art, instruction-tuned language model developed by the distinguished Qwen team at Alibaba Group. Released on June 7, 2024, as Version 2.0, this text-to-text model strikes an optimal balance between high performance and efficient resource utilization, making it an excellent choice for a wide spectrum of natural language processing (NLP) applications.
Basic Information:
- Model Name: Qwen2 1.5B Instruct
- Developer/Creator: Qwen team (Alibaba Group)
- Release Date: June 7, 2024
- Version: 2.0
- Model Type: Text-to-text language model
🚀 Key Features & Performance Advantages
Qwen2 1.5B Instruct is engineered with advanced features to deliver superior performance and efficiency:
- Instruction-Tuned: Optimized for better understanding and execution of specific tasks, leading to improved accuracy and relevance.
- Group Query Attention (GQA): Significantly enhances inference speed and reduces memory consumption, making it highly efficient for diverse applications.
- Tied Embeddings: Boosts parameter efficiency, contributing to the model's compact size without compromising capability.
- Extended Context Length: Processes inputs of up to 128,000 tokens and generates outputs containing up to 8,000 tokens, allowing for deeper contextual understanding.
- Robust Multilingual Support: Supports 29 languages beyond English and Chinese, including French, Spanish, Portuguese, German, Italian, Russian, Japanese, Korean, Vietnamese, Thai, and Arabic, catering to a global user base.
✅ Intended Use Cases & Applications
Qwen2 1.5B Instruct is a highly versatile model suitable for a broad range of natural language processing tasks, including:
- Text Generation: Creating coherent and contextually relevant content.
- Question Answering: Providing accurate and insightful responses to queries.
- Language Understanding: Analyzing and interpreting complex linguistic patterns.
- Code Generation: Assisting developers with generating code snippets and functions.
- Mathematical Problem-Solving: Tackling numerical and logical challenges.
⚙️ Technical Details & Architecture
Architecture:
The model is built upon the robust Transformer architecture, enhanced with several key modifications:
- SwiGLU Activation: Improves non-linearity and model performance.
- Attention QKV Bias: Refines the attention mechanism for better focus and understanding.
- Group Query Attention (GQA): Optimizes processing for faster and more memory-efficient operations.
- Advanced Tokenizer: An improved tokenizer specifically designed for superior handling of multiple natural languages and code.
Training Data:
- Data Source & Size: The model was trained on an expansive dataset comprising approximately 18 trillion tokens.
- Knowledge Cutoff: The model's knowledge is current up to September 2024.
- Diversity & Bias: The training data incorporates a broad spectrum of languages and domains, meticulously curated to reduce bias and enhance model robustness across various topics.
Performance Metrics:
Qwen2 1.5B Instruct demonstrates significant performance improvements compared to its predecessor.

Image: Performance comparison between Qwen2 1.5B Instruct and its predecessor.
Comparison to Other Models:
- Accuracy: Shows marked improvements over its predecessor across various industry benchmarks.
- Speed: The implementation of Group Query Attention (GQA) ensures significantly faster inference rates compared to prior versions.
- Robustness: Enhanced multilingual capabilities and a diverse training dataset contribute to improved generalization across a multitude of topics and languages.
- Real-world Testing: In our internal evaluations, including comprehensive analyses such as LLama 3 vs Qwen 2 Comparison and Qwen 2 72B vs ChatGPT 4o Comparison, Qwen2 demonstrated commendable performance, even when faced with culturally specific and non-obvious prompts. It is particularly recommended for applications involving Asian language groups due to its strong support.
📚 Usage & Ethical Guidelines
Code Samples:
Integrating Qwen2 1.5B Instruct into your projects is designed to be straightforward. Here’s a typical example for chat completion:
<snippet data-name="open-ai.chat-completion" data-model="Qwen/Qwen2-1.5B-Instruct"></snippet>
Note: Specific implementation details may vary based on your development environment and API integration.
Ethical Guidelines:
Responsible and ethical usage is paramount. Users are strongly encouraged to adhere to the following principles:
- Respect intellectual property rights when incorporating generated content into personal or commercial projects.
- Be critically aware of and address potential biases that might appear in the model's outputs.
- Use the model responsibly and actively avoid generating harmful, misleading, or inappropriate content.
Licensing:
Qwen2 1.5B Instruct is made available under the permissive Apache 2.0 License, which allows for broad usage in both commercial and non-commercial applications.
❓ Frequently Asked Questions (FAQ)
Q1: What is Qwen2 1.5B Instruct?
A1: Qwen2 1.5B Instruct is a compact, instruction-tuned text-to-text language model from Alibaba Group's Qwen team, designed for efficient performance across various natural language processing tasks.
Q2: What are the key features contributing to its efficiency?
A2: Its efficiency stems from Group Query Attention (GQA) for faster inference and reduced memory, tied embeddings for parameter optimization, and an extended context length, balancing powerful performance with resource friendliness.
Q3: How many languages does Qwen2 1.5B Instruct support?
A3: The model offers robust multilingual support for 29 languages, including a wide array of global languages such as English, Chinese, French, Spanish, Japanese, Korean, and Arabic.
Q4: Can Qwen2 1.5B Instruct be used for commercial purposes?
A4: Yes, Qwen2 1.5B Instruct is released under the Apache 2.0 License, which permits its use for both commercial and non-commercial applications.
Q5: What is the knowledge cutoff date for this model?
A5: The model's training data ensures its knowledge is current up to September 2024, providing access to recent information and trends.
Learn how you can transformyour company with AICC APIs



Log in