|
| 1 | +<div style="background: linear-gradient(135deg, #2563eb, #1e40af); padding: 24px; border-radius: 8px; color: white; text-align: center; margin-bottom: 24px;"> |
| 2 | + <h2 style="margin: 0; color: white;">🤖 Kimi K2 Language Model</h2> |
| 3 | + <p style="margin: 8px 0 0 0; opacity: 0.9;">Advanced Mixture of Experts (MoE) Language Model Technology Overview</p> |
| 4 | +</div> |
| 5 | + |
| 6 | +## 🎯 Core Overview |
| 7 | + |
| 8 | +<div style="background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px; margin: 16px 0;"> |
| 9 | + |
| 10 | +Kimi K2 is a state-of-the-art Mixture of Experts (MoE) language model with **32 billion activated parameters** and **1 trillion total parameters**. Trained with the Muon optimizer, Kimi K2 excels in cutting-edge knowledge, reasoning, and programming tasks, while being specifically optimized for agentic capabilities. |
| 11 | + |
| 12 | +</div> |
| 13 | + |
| 14 | +## 🏗️ Technical Architecture Features |
| 15 | + |
| 16 | +<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 16px 0;"> |
| 17 | + |
| 18 | +<div style="background: #eff6ff; border-left: 4px solid #2563eb; padding: 16px; border-radius: 4px;"> |
| 19 | +<h3 style="margin-top: 0; color: #1e40af;">📊 Large-Scale Training</h3> |
| 20 | +<ul style="margin: 8px 0 0 0; padding-left: 20px;"> |
| 21 | +<li><strong>Training Scale</strong>: Pre-trained on 15.5T tokens</li> |
| 22 | +<li><strong>Model Parameters</strong>: 1T parameter MoE architecture</li> |
| 23 | +<li><strong>Stability</strong>: No training instability issues</li> |
| 24 | +</ul> |
| 25 | +</div> |
| 26 | + |
| 27 | +<div style="background: #f0fdf4; border-left: 4px solid #059669; padding: 16px; border-radius: 4px;"> |
| 28 | +<h3 style="margin-top: 0; color: #059669;">⚡ MuonClip Optimizer</h3> |
| 29 | +<ul style="margin: 8px 0 0 0; padding-left: 20px;"> |
| 30 | +<li><strong>Innovative Application</strong>: Muon optimizer at unprecedented scale</li> |
| 31 | +<li><strong>Technical Breakthrough</strong>: Novel optimization techniques</li> |
| 32 | +<li><strong>Stability Assurance</strong>: Resolves instabilities during scaling</li> |
| 33 | +</ul> |
| 34 | +</div> |
| 35 | + |
| 36 | +<div style="background: #fef3c7; border-left: 4px solid #f59e0b; padding: 16px; border-radius: 4px;"> |
| 37 | +<h3 style="margin-top: 0; color: #d97706;">🧠 Agentic Intelligence</h3> |
| 38 | +<ul style="margin: 8px 0 0 0; padding-left: 20px;"> |
| 39 | +<li><strong>Tool Usage</strong>: Specially optimized tool calling capabilities</li> |
| 40 | +<li><strong>Reasoning Ability</strong>: Advanced logical reasoning</li> |
| 41 | +<li><strong>Autonomous Problem-Solving</strong>: Independent problem resolution capabilities</li> |
| 42 | +</ul> |
| 43 | +</div> |
| 44 | + |
| 45 | +</div> |
| 46 | + |
| 47 | +## 📖 User Guide |
| 48 | + |
| 49 | +<div style="background: #eff6ff; border-left: 4px solid #2563eb; padding: 16px; margin: 16px 0; border-radius: 4px;"> |
| 50 | + <strong>💡 Quick Start</strong><br> |
| 51 | + After completing the model deployment, you can view the model usage instructions on the Computing Nest service instance overview page, which provides API call examples, internal network access addresses, public network access addresses, and ApiKey. |
| 52 | +</div> |
| 53 | + |
| 54 | +<div style="background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px; margin: 16px 0;"> |
| 55 | + <div style="text-align: center; margin-bottom: 16px;"> |
| 56 | + <img src="../image-en/img-llm-use-desc.png" alt="Model usage instructions interface" style="max-width: 100%; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);"> |
| 57 | + </div> |
| 58 | +</div> |
| 59 | + |
| 60 | +### 🔌 API Call Methods |
| 61 | + |
| 62 | +#### 🖥️ Curl Command Call |
| 63 | + |
| 64 | +<div style="background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px; margin: 16px 0;"> |
| 65 | + |
| 66 | +<div style="text-align: center; margin-bottom: 16px;"> |
| 67 | + <img src="../image-en/img-api-call.png" alt="API call example" style="max-width: 100%; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);"> |
| 68 | +</div> |
| 69 | + |
| 70 | +<div style="background: #eff6ff; border-left: 4px solid #2563eb; padding: 16px; margin: 16px 0; border-radius: 4px;"> |
| 71 | + <strong>📋 Parameter Description</strong><br> |
| 72 | + • <code>${ServerIP}</code>: IP address from internal or public network address<br> |
| 73 | + • <code>${ApiKey}</code>: ApiKey provided on the page<br> |
| 74 | + • <code>${ModelName}</code>: Model name |
| 75 | +</div> |
| 76 | + |
| 77 | +Curl command calls can directly use the API call examples from the service instance overview page. The specific structure for calling the model API is as follows: |
| 78 | + |
| 79 | +```bash |
| 80 | +curl -X Post http://${ServerIP}:8000/v1/chat/completions \ |
| 81 | + -H "Content-Type: application/json" \ |
| 82 | + -H "Authorization: Bearer ${ApiKey}" \ |
| 83 | + -d '{ |
| 84 | + "model": "${ModelName}", |
| 85 | + "messages": [ |
| 86 | + { |
| 87 | + "role": "user", |
| 88 | + "content": "Write a letter to my daughter from the future year 2035, telling her to study technology well, become the master of technology, and promote technological and economic development; she is currently in 3rd grade" |
| 89 | + } |
| 90 | + ] |
| 91 | + }' |
| 92 | +``` |
| 93 | + |
| 94 | +</div> |
| 95 | + |
| 96 | +#### 🐍 Python SDK Call |
| 97 | + |
| 98 | +<div style="background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px; margin: 16px 0;"> |
| 99 | + |
| 100 | +<div style="background: #eff6ff; border-left: 4px solid #2563eb; padding: 16px; margin: 16px 0; border-radius: 4px;"> |
| 101 | + <strong>⚙️ Configuration Instructions</strong><br> |
| 102 | + • <code>${ApiKey}</code>: Fill in the ApiKey from the page<br> |
| 103 | + • <code>${ServerUrl}</code>: Fill in the public or internal network address from the page, must include <code>/v1</code> |
| 104 | +</div> |
| 105 | + |
| 106 | +The following is Python example code: |
| 107 | + |
| 108 | +```python |
| 109 | +from openai import OpenAI |
| 110 | + |
| 111 | +##### API Configuration ##### |
| 112 | +openai_api_key = "${ApiKey}" |
| 113 | +openai_api_base = "${ServerUrl}" |
| 114 | + |
| 115 | +client = OpenAI( |
| 116 | + api_key=openai_api_key, |
| 117 | + base_url=openai_api_base, |
| 118 | +) |
| 119 | + |
| 120 | +models = client.models.list() |
| 121 | +model = models.data[0].id |
| 122 | +print(model) |
| 123 | + |
| 124 | + |
| 125 | +def main(): |
| 126 | + stream = True |
| 127 | + |
| 128 | + chat_completion = client.chat.completions.create( |
| 129 | + messages=[ |
| 130 | + { |
| 131 | + "role": "user", |
| 132 | + "content": [ |
| 133 | + { |
| 134 | + "type": "text", |
| 135 | + "text": "Hello, please introduce yourself in as much detail as possible.", |
| 136 | + } |
| 137 | + ], |
| 138 | + } |
| 139 | + ], |
| 140 | + model=model, |
| 141 | + max_completion_tokens=1024, |
| 142 | + stream=stream, |
| 143 | + ) |
| 144 | + |
| 145 | + if stream: |
| 146 | + for chunk in chat_completion: |
| 147 | + print(chunk.choices[0].delta.content, end="") |
| 148 | + else: |
| 149 | + result = chat_completion.choices[0].message.content |
| 150 | + print(result) |
| 151 | + |
| 152 | + |
| 153 | +if __name__ == "__main__": |
| 154 | + main() |
| 155 | +``` |
| 156 | + |
| 157 | +</div> |
| 158 | + |
| 159 | +### 🌐 Web Application Access |
| 160 | + |
| 161 | +<div style="background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 20px; margin: 16px 0;"> |
| 162 | + |
| 163 | +#### 📱 Access Steps |
| 164 | + |
| 165 | +<div style="display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin: 16px 0;"> |
| 166 | + |
| 167 | +<div style="background: #eff6ff; border-left: 4px solid #2563eb; padding: 16px; border-radius: 4px;"> |
| 168 | +<h4 style="margin-top: 0; color: #1e40af;">🔗 Step 1: Get Access Link</h4> |
| 169 | +<p style="margin: 0;">On the service instance overview page, click the link corresponding to the Web application to directly access the model service Web interface.</p> |
| 170 | +</div> |
| 171 | + |
| 172 | +<div style="background: #dcfce7; border-left: 4px solid #059669; padding: 16px; border-radius: 4px;"> |
| 173 | +<h4 style="margin-top: 0; color: #059669;">💬 Step 2: Start Conversation</h4> |
| 174 | +<p style="margin: 0;">Enter your question in the input box on the model service Web page to start conversing with the large language model.</p> |
| 175 | +</div> |
| 176 | + |
| 177 | +</div> |
| 178 | + |
| 179 | +#### 🖼️ Interface Display |
| 180 | + |
| 181 | +<div style="text-align: center; margin: 20px 0;"> |
| 182 | + <img src="../image-en/img-web.png" alt="Web Application Access Entry" style="max-width: 100%; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); border: 1px solid #e2e8f0;"> |
| 183 | +</div> |
| 184 | + |
| 185 | +<div style="background: #eff6ff; border-left: 4px solid #2563eb; padding: 16px; margin: 16px 0; border-radius: 4px;"> |
| 186 | + <strong>💡 Access Tips</strong><br> |
| 187 | + Find the link corresponding to the Web application on the service instance overview page and click it to directly access the model service Web interface. |
| 188 | +</div> |
| 189 | + |
| 190 | +<div style="text-align: center; margin: 20px 0;"> |
| 191 | + <img src="../image-en/img-appflow.png" alt="Model Conversation Interface" style="max-width: 100%; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); border: 1px solid #e2e8f0;"> |
| 192 | +</div> |
| 193 | + |
| 194 | +<div style="background: #dcfce7; border-left: 4px solid #059669; padding: 16px; margin: 16px 0; border-radius: 4px;"> |
| 195 | + <strong>✅ Usage Instructions</strong><br> |
| 196 | + Enter your questions or requirements in the input box, and the system will respond in real-time and provide corresponding model services. |
| 197 | +</div> |
| 198 | + |
| 199 | +</div> |
| 200 | + |
| 201 | +--- |
| 202 | + |
| 203 | +<div style="text-align: center; padding: 16px; background: #f8fafc; border-radius: 6px; margin-top: 24px;"> |
| 204 | + <p style="margin: 0; color: #64748b; font-size: 14px;"> |
| 205 | + 🤖 <strong>Kimi K2</strong> | Next-Generation Mixture of Experts Language Model Technology Breakthrough |
| 206 | + </p> |
| 207 | +</div> |
0 commit comments