bsfg commited on
Commit
db8e819
·
verified ·
1 Parent(s): 489fa90

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +107 -1
README.md CHANGED
@@ -174,4 +174,110 @@ curl http://localhost:30000/v1/chat/completions \
174
  "max_tokens": 1000,
175
  "temperature": 0
176
  }'
177
- ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  "max_tokens": 1000,
175
  "temperature": 0
176
  }'
177
+ ```
178
+
179
+ ## Function call
180
+
181
+ ### 1. `vLLM`
182
+
183
+ Соберите dev версию, коммит>=[21bb323](https://github.com/vllm-project/vllm/tree/21bb323542bad9d7a7206d949f33734caf48c40c))
184
+
185
+ Запуск сервера
186
+ ```shell
187
+ # VLLM DeepGemm conflicts with our hidden dim size.
188
+ # Fix: Disable it via env var (VLLM_USE_DEEP_GEMM=0).
189
+ VLLM_USE_DEEP_GEMM=0 vllm serve ai-sage/GigaChat3-10B-A1.8B \
190
+ --dtype "auto" \
191
+ --speculative-config '{"method": "mtp", "num_speculative_tokens": 1, "disable_padded_drafter_batch": false}' \
192
+ --enable-auto-tool-choice \
193
+ --tool-call-parser gigachat3
194
+ ```
195
+
196
+ Пример запроса
197
+ ```shell
198
+ curl http://localhost:8000/v1/chat/completions \
199
+ -H "Content-Type: application/json" \
200
+ -d '{
201
+ "model": "ai-sage/GigaChat3-10B-A1.8B",
202
+ "temperature": 0,
203
+ "messages": [
204
+ {
205
+ "role": "user",
206
+ "content": "Какая сейчас погода в Москве?"
207
+ }
208
+ ],
209
+ "tools": [
210
+ {
211
+ "type": "function",
212
+ "function": {
213
+ "name": "get_weather",
214
+ "description": "Получить информацию о текущей погоде в указанном городе.",
215
+ "parameters": {
216
+ "type": "object",
217
+ "properties": {
218
+ "city": {
219
+ "type": "string",
220
+ "description": "Название города (например, Москва, Казань)."
221
+ }
222
+ },
223
+ "required": ["city"]
224
+ }
225
+ }
226
+ }
227
+ ]
228
+ }'
229
+ ```
230
+
231
+ ### 2. `SGLang`
232
+
233
+ Соберите dev версию на данной ветке - https://github.com/sgl-project/sglang/pull/14765.
234
+
235
+ Запуск сервера
236
+ ```shell
237
+ python -m sglang.launch_server \
238
+ --model-path ai-sage/GigaChat3-10B-A1.8B \
239
+ --host 0.0.0.0 \
240
+ --port 30000 \
241
+ --dtype auto \
242
+ --mem-fraction-static 0.88 \
243
+ --speculative-algorithm EAGLE \
244
+ --speculative-num-steps 1 \
245
+ --speculative-eagle-topk 1 \
246
+ --speculative-num-draft-tokens 2
247
+ --tool-call-parser gigachat3
248
+ ```
249
+
250
+ Пример запроса
251
+ ```shell
252
+ curl http://localhost:30000/v1/chat/completions \
253
+ -H "Content-Type: application/json" \
254
+ -d '{
255
+ "model": "ai-sage/GigaChat3-10B-A1.8B",
256
+ "temperature": 0,
257
+ "messages": [
258
+ {
259
+ "role": "user",
260
+ "content": "Какая сейчас погода в Москве?"
261
+ }
262
+ ],
263
+ "tools": [
264
+ {
265
+ "type": "function",
266
+ "function": {
267
+ "name": "get_weather",
268
+ "description": "Получить информацию о текущей погоде в указанном городе.",
269
+ "parameters": {
270
+ "type": "object",
271
+ "properties": {
272
+ "city": {
273
+ "type": "string",
274
+ "description": "Название города (например, Москва, Казань)."
275
+ }
276
+ },
277
+ "required": ["city"]
278
+ }
279
+ }
280
+ }
281
+ ]
282
+ }'
283
+ ```