Kirim-1-Math is a 16-billion parameter mathematical reasoning model, representing a major leap in the Kirim model series. As the first Kirim model with tool calling capabilities, it combines advanced mathematical problem-solving with the ability to use external tools and execute calculations.
Key Features
Advanced Math Reasoning: Trained on mathematical proofs, olympiad problems, and research papers
Tool Calling: First in Kirim series with function calling capabilities
Symbolic Solver: Handles algebraic manipulation, calculus, and symbolic computation
Bilingual: Solves problems in both Chinese and English
Code Execution: Can write and execute Python code for numerical solutions
Theorem Lookup: Access mathematical theorems and formulas
Tool Calling Example
python
1messages =[2{3"role":"user",4"content":"Calculate 2^1024 and tell me how many digits it has"5}6]78# Model will automatically decide to use calculator tool9inputs = tokenizer.apply_chat_template(messages, return_tensors="pt")10outputs = model.generate(inputs, max_new_tokens=2048)1112# Response will include tool calls like:13# <tool_call>14# {15# "name": "calculator",16# "arguments": {17# "expression": "2**1024"18# }19# }20# </tool_call>
Custom Tool Definition
python
1tools =[2{3"type":"function",4"function":{5"name":"scientific_calculator",6"description":"Perform advanced scientific calculations",7"parameters":{8"type":"object",9"properties":{10"expression":{11"type":"string",12"description":"Mathematical expression to evaluate"13},14"precision":{15"type":"integer",16"description":"Decimal precision",17"default":1018}19},20"required":["expression"]21}22}23}24]2526# Include tools in prompt27messages =[28{"role":"system","content":f"You have access to these tools: {tools}"},29{"role":"user","content":"Calculate sin(π/4) with 15 decimal places"}30]
Mathematical Capabilities
1. Algebraic Reasoning
python
1# Example: Solve system of equations2problem ="""
3解方程组:
42x + 3y = 12
54x - y = 5
6"""78response = model.generate_solution(problem)9# Output includes step-by-step solution with reasoning
2. Calculus
python
1# Integration2problem ="Calculate: ∫(x³ + 2x² - x + 1)dx"34# Differentiation5problem ="Find dy/dx if y = ln(x²) + e^(3x)"
3. Probability & Statistics
python
1problem ="""
2A bag contains 5 red balls and 3 blue balls.
3What's the probability of drawing 2 red balls without replacement?
4"""
4. Number Theory
python
1problem ="Prove that √2 is irrational"2# Model provides formal mathematical proof
5. Geometry
python
1problem ="""
2In triangle ABC, if AB = 5, BC = 7, and AC = 8,
3find the area using Heron's formula.
4"""
Use Cases
1. Educational Tutoring
python
1messages =[2{3"role":"user",4"content":"I don't understand how to complete the square. Can you explain and show an example?"5}6]7# Provides step-by-step explanations
2. Research Assistance
python
1messages =[2{3"role":"user",4"content":"Help me verify this proof about convergence of infinite series"5}6]7# Analyzes mathematical proofs
3. Homework Help
python
1messages =[2{3"role":"user",4"content":"Solve these 10 calculus problems and show your work"5}6]7# Solves problems with detailed steps
4. Competition Preparation
python
1messages =[2{3"role":"user",4"content":"Give me 5 AMC-level problems to practice"5}6]7# Generates practice problems
5. Code-Assisted Solving
python
1messages =[2{3"role":"user",4"content":"Use numerical methods to find roots of x^5 - 3x^3 + 2x - 1 = 0"5}6]7# Writes and executes numerical solver
Advanced Features
Step-by-Step Reasoning
The model shows its work:
Problem: Solve x² - 5x + 6 = 0
Solution:
Step 1: Identify this as a quadratic equation in standard form ax² + bx + c = 0
where a=1, b=-5, c=6
Step 2: Try factoring: We need two numbers that multiply to 6 and add to -5
Those numbers are -2 and -3
Step 3: Factor: (x - 2)(x - 3) = 0
Step 4: Apply zero product property:
x - 2 = 0 or x - 3 = 0
Step 5: Solve each equation:
x = 2 or x = 3
Answer: x = 2 or x = 3
LaTeX Output
python
1# Request LaTeX formatted output2messages =[3{4"role":"user",5"content":"Solve this and format the answer in LaTeX: ∫(x² + 1)/(x³ + 3x + 1)dx"6}7]89# Output includes:10# $$\int \frac{x^2 + 1}{x^3 + 3x + 1}dx = ...$$