import OpenAI from "openai"
const openai = new OpenAI({
baseURL: "https://api.aiapilab.com/v1",
apiKey: $AIAPILAB_API_KEY
})
async function main() {
const completion = await openai.chat.completions.create({
model: "meta-llama/llama-3.2-1b-instruct",
messages: [
{
"role": "user",
"content": "Write a blog about cat."
}
]
})
console.log(completion.choices[0].message)
}
main()
Feature/Aspect | Llama 3.1 8B Instruct | Llama 3.2 1B Instruct | Llama 3.1 70B Instruct |
---|---|---|---|
Use Cases | Optimized for assistant-like chat and various natural language generation tasks | Ideal for multilingual dialogue tasks, summarization, and text generation | High performance in complex language tasks and extensive text generation capabilities |
Parameters | 8 billion | 1.24 billion | 70 billion |
Architecture | Optimized transformer architecture | Optimized transformer architecture | Optimized transformer architecture |
Context Length | 128k tokens | 128k tokens | 128k tokens |
Multilingual Support | Supports 8 languages: English, German, French, Italian, Portuguese, Hindi, Spanish, Thai | Supports 8 languages: English, German, French, Italian, Portuguese, Hindi, Spanish, Thai | Supports 8 languages: English, German, French, Italian, Portuguese, Hindi, Spanish, Thai |