Glm4.5 1
modelsnebius-token-factory-cookbook
Export
Run GLM-4.5 model on Nebius Token Factory
zai-org/GLM-4.5 model is a top performing open source model. It comes in 'thinking' and 'instruct' variants. Use this notebook to run this model on Nebius Token Factory.
References
- Model card : zai-org/GLM-4.5
- Model card for 'air' version: zai-org/GLM-4.5-Air
- Nebius Token Factory
Pre requisites
- Nebius API key. Sign up for free at Token Factory
1 - Getting Started
1.1 - Get your Nebius API key at Nebius Token Factory
1.2 - If running on Google Colab ...
Add NEBIUS_API_KEY to Secrets panel on the left as follows

1.3 - If running locally
Create an .env file with NEBIUS_API_KEY as follows
NEBIUS_API_KEY=your_api_key_goes_here
2 - Install Dependencies
[7]
2 - Load Configuration
[8]
Running in Colab ✅ NEBIUS_API_KEY found
3 - Run the Model
3.1 - Initialize the client
[9]
3.2 - Find out the model's capabilities
[10]
----model answer ----- I'm an AI assistant with a range of capabilities designed to help with various tasks: **Information & Knowledge:** - Answer questions on diverse topics including science, history, technology, and more - Explain complex concepts in simpler terms - Provide summaries of information on subjects you're interested in **Writing & Communication:** - Help draft, edit, and refine written content - Assist with creative writing, emails, reports, and other documents - Brainstorm ideas for projects or content - Improve grammar, style, and clarity in writing **Problem-Solving & Analysis:** - Break down complex problems - Compare and analyze information - Help with decision-making by presenting options - Assist with basic math and logical reasoning **Technical Assistance:** - Help with coding questions and debugging - Explain programming concepts - Assist with technical documentation **Language & Learning:** - Aid with language translation and learning - Explain vocabulary and grammar - Help create study materials and learning strategies I should note that I have limitations too - I don't have real-time information unless browsing is specifically enabled, I can't perform physical tasks, and I shouldn't replace professional advice in specialized fields like medicine or law. What would you like help with today? CPU times: user 10.1 ms, sys: 104 µs, total: 10.2 ms Wall time: 10.6 s
3.3 - Ask a factual question
[11]
----model answer -----
The capital of France is Paris.
----- full response ----
{
"id": "chatcmpl-66476152779940f8894157b05a09a948",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"logprobs": null,
"message": {
"content": "The capital of France is Paris.",
"refusal": null,
"role": "assistant",
"annotations": null,
"audio": null,
"function_call": null,
"tool_calls": [],
"reasoning_content": "This is a straightforward factual question about the capital of France. The capital of France is Paris, which has been the capital city for many centuries and is the country's largest city. I'll provide a clear and direct answer."
},
"stop_reason": 151336
}
],
"created": 1754687831,
"model": "zai-org/GLM-4.5",
"object": "chat.completion",
"service_tier": null,
"system_fingerprint": null,
"usage": {
"completion_tokens": 56,
"prompt_tokens": 20,
"total_tokens": 76,
"completion_tokens_details": null,
"prompt_tokens_details": null
},
"prompt_logprobs": null,
"kv_transfer_params": null
}
---------
CPU times: user 3.57 ms, sys: 1.77 ms, total: 5.34 ms
Wall time: 1.28 s
3.4 - Ask a reasoning question
[12]
To determine which number is bigger between 9.9 and 9.11, we need to compare their decimal parts carefully, as both share the same whole number part (9). - 9.9 can be written as 9.90 (adding a zero to make it easier to compare with two decimal places). - 9.11 is already expressed with two decimal places. Now, compare the decimal parts: - 9.90 has a decimal part of 0.90 (which is 90 hundredths). - 9.11 has a decimal part of 0.11 (which is 11 hundredths). Since 90 hundredths is greater than 11 hundredths (0.90 > 0.11), it follows that 9.90 > 9.11, and therefore **9.9 is bigger than 9.11**. ### Why this might be confusing: Sometimes people mistakenly think that 9.11 is larger because "11" is greater than "9" when ignoring the decimal point. However, in decimal notation, the place value matters: - In 9.9, the digit 9 is in the tenths place, meaning it represents 9/10 or 0.9. - In 9.11, the digit 1 is in the tenths place (representing 1/10 or 0.1), and the second 1 is in the hundredths place (representing 1/100 or 0.01). Since the tenths place has a higher value than the hundredths place, 9.9 (with 9 tenths) is larger than 9.11 (with only 1 tenth and 1 hundredth). Even if we consider the hundredths, 9 tenths (90 hundredths) is still greater than 11 hundredths. ### Additional verification: - **Subtraction method**: 9.9 - 9.11 = 0.79, which is positive, confirming that 9.9 is larger. - **Number line**: On a number line, 9.9 (or 9.90) is closer to 10.0 than 9.11, so it is to the right and thus larger. In summary, **9.9 is bigger than 9.11**. ---------- CPU times: user 7.64 ms, sys: 82 µs, total: 7.72 ms Wall time: 29.7 s
5 - Try Your Queries
Go ahead and experiment with your queries. Here are some to get you started.
Write python code to read a csv file
write a haiku about cats
[12]