Skip to content

Commit 9fdafd1

Browse files
committed
Update 2025-10-05 19:07:17
1 parent e69df76 commit 9fdafd1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+5204
-5878
lines changed

_sources/advanced_features/lora.ipynb

Lines changed: 144 additions & 156 deletions
Large diffs are not rendered by default.

_sources/advanced_features/separate_reasoning.ipynb

Lines changed: 97 additions & 120 deletions
Large diffs are not rendered by default.

_sources/advanced_features/speculative_decoding.ipynb

Lines changed: 464 additions & 711 deletions
Large diffs are not rendered by default.

_sources/advanced_features/structured_outputs.ipynb

Lines changed: 139 additions & 137 deletions
Large diffs are not rendered by default.

_sources/advanced_features/structured_outputs_for_reasoning_models.ipynb

Lines changed: 180 additions & 173 deletions
Large diffs are not rendered by default.

_sources/advanced_features/tool_parser.ipynb

Lines changed: 172 additions & 157 deletions
Large diffs are not rendered by default.

_sources/advanced_features/vlm_query.ipynb

Lines changed: 192 additions & 195 deletions
Large diffs are not rendered by default.

_sources/basic_usage/native_api.ipynb

Lines changed: 152 additions & 158 deletions
Large diffs are not rendered by default.

_sources/basic_usage/offline_engine_api.ipynb

Lines changed: 479 additions & 480 deletions
Large diffs are not rendered by default.

_sources/basic_usage/openai_api_completions.ipynb

Lines changed: 42 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@
3131
"execution_count": 1,
3232
"metadata": {
3333
"execution": {
34-
"iopub.execute_input": "2025-10-05T15:47:20.763204Z",
35-
"iopub.status.busy": "2025-10-05T15:47:20.763070Z",
36-
"iopub.status.idle": "2025-10-05T15:47:55.262083Z",
37-
"shell.execute_reply": "2025-10-05T15:47:55.261376Z"
34+
"iopub.execute_input": "2025-10-05T18:54:31.997749Z",
35+
"iopub.status.busy": "2025-10-05T18:54:31.997630Z",
36+
"iopub.status.idle": "2025-10-05T18:55:04.258322Z",
37+
"shell.execute_reply": "2025-10-05T18:55:04.257797Z"
3838
}
3939
},
4040
"outputs": [
@@ -86,7 +86,7 @@
8686
"output_type": "stream",
8787
"text": [
8888
"`torch_dtype` is deprecated! Use `dtype` instead!\n",
89-
"[2025-10-05 15:47:43] `torch_dtype` is deprecated! Use `dtype` instead!\n"
89+
"[2025-10-05 18:54:52] `torch_dtype` is deprecated! Use `dtype` instead!\n"
9090
]
9191
},
9292
{
@@ -97,7 +97,7 @@
9797
"[Gloo] Rank 0 is connected to 0 peer ranks. Expected number of connected peer ranks is : 0\n",
9898
"[Gloo] Rank 0 is connected to 0 peer ranks. Expected number of connected peer ranks is : 0\n",
9999
"[Gloo] Rank 0 is connected to 0 peer ranks. Expected number of connected peer ranks is : 0\n",
100-
"[2025-10-05 15:47:45] MOE_RUNNER_BACKEND is not initialized, using triton backend\n"
100+
"[2025-10-05 18:54:54] MOE_RUNNER_BACKEND is not initialized, using triton backend\n"
101101
]
102102
},
103103
{
@@ -107,9 +107,9 @@
107107
"\r",
108108
"Loading safetensors checkpoint shards: 0% Completed | 0/1 [00:00<?, ?it/s]\n",
109109
"\r",
110-
"Loading safetensors checkpoint shards: 100% Completed | 1/1 [00:00<00:00, 4.84it/s]\n",
110+
"Loading safetensors checkpoint shards: 100% Completed | 1/1 [00:00<00:00, 5.58it/s]\n",
111111
"\r",
112-
"Loading safetensors checkpoint shards: 100% Completed | 1/1 [00:00<00:00, 4.83it/s]\n",
112+
"Loading safetensors checkpoint shards: 100% Completed | 1/1 [00:00<00:00, 5.58it/s]\n",
113113
"\n"
114114
]
115115
},
@@ -127,10 +127,10 @@
127127
"output_type": "stream",
128128
"text": [
129129
"\r",
130-
"Capturing batches (bs=4 avail_mem=77.03 GB): 33%|███▎ | 1/3 [00:00<00:00, 4.03it/s]\r",
131-
"Capturing batches (bs=2 avail_mem=76.97 GB): 33%|███▎ | 1/3 [00:00<00:00, 4.03it/s]\r",
132-
"Capturing batches (bs=1 avail_mem=76.96 GB): 33%|███▎ | 1/3 [00:00<00:00, 4.03it/s]\r",
133-
"Capturing batches (bs=1 avail_mem=76.96 GB): 100%|██████████| 3/3 [00:00<00:00, 9.70it/s]\n"
130+
"Capturing batches (bs=4 avail_mem=77.03 GB): 33%|███▎ | 1/3 [00:00<00:00, 4.13it/s]\r",
131+
"Capturing batches (bs=2 avail_mem=76.96 GB): 33%|███▎ | 1/3 [00:00<00:00, 4.13it/s]\r",
132+
"Capturing batches (bs=1 avail_mem=76.96 GB): 33%|███▎ | 1/3 [00:00<00:00, 4.13it/s]\r",
133+
"Capturing batches (bs=1 avail_mem=76.96 GB): 100%|██████████| 3/3 [00:00<00:00, 9.72it/s]\n"
134134
]
135135
},
136136
{
@@ -149,7 +149,7 @@
149149
"name": "stdout",
150150
"output_type": "stream",
151151
"text": [
152-
"Server started on http://localhost:35148\n"
152+
"Server started on http://localhost:39540\n"
153153
]
154154
}
155155
],
@@ -183,17 +183,17 @@
183183
"execution_count": 2,
184184
"metadata": {
185185
"execution": {
186-
"iopub.execute_input": "2025-10-05T15:47:55.264341Z",
187-
"iopub.status.busy": "2025-10-05T15:47:55.263950Z",
188-
"iopub.status.idle": "2025-10-05T15:47:55.529250Z",
189-
"shell.execute_reply": "2025-10-05T15:47:55.528636Z"
186+
"iopub.execute_input": "2025-10-05T18:55:04.259991Z",
187+
"iopub.status.busy": "2025-10-05T18:55:04.259675Z",
188+
"iopub.status.idle": "2025-10-05T18:55:04.519355Z",
189+
"shell.execute_reply": "2025-10-05T18:55:04.518927Z"
190190
}
191191
},
192192
"outputs": [
193193
{
194194
"data": {
195195
"text/html": [
196-
"<strong style='color: #00008B;'>Response: ChatCompletion(id='10d6a11d41b043278d8451b18754dfb3', choices=[Choice(finish_reason='stop', index=0, logprobs=None, message=ChatCompletionMessage(content='Sure, here are three countries and their respective capitals:\\n\\n1. **United States** - Washington, D.C.\\n2. **Canada** - Ottawa\\n3. **Australia** - Canberra', refusal=None, role='assistant', annotations=None, audio=None, function_call=None, tool_calls=None, reasoning_content=None), matched_stop=151645)], created=1759679275, model='qwen/qwen2.5-0.5b-instruct', object='chat.completion', service_tier=None, system_fingerprint=None, usage=CompletionUsage(completion_tokens=39, prompt_tokens=37, total_tokens=76, completion_tokens_details=None, prompt_tokens_details=None, reasoning_tokens=0), metadata={'weight_version': 'default'})</strong>"
196+
"<strong style='color: #00008B;'>Response: ChatCompletion(id='2c8b55d5c46c45569451fc352edc21ef', choices=[Choice(finish_reason='stop', index=0, logprobs=None, message=ChatCompletionMessage(content='Sure, here are three countries and their respective capitals:\\n\\n1. **United States** - Washington, D.C.\\n2. **Canada** - Ottawa\\n3. **Australia** - Canberra', refusal=None, role='assistant', annotations=None, audio=None, function_call=None, tool_calls=None, reasoning_content=None), matched_stop=151645)], created=1759690504, model='qwen/qwen2.5-0.5b-instruct', object='chat.completion', service_tier=None, system_fingerprint=None, usage=CompletionUsage(completion_tokens=39, prompt_tokens=37, total_tokens=76, completion_tokens_details=None, prompt_tokens_details=None, reasoning_tokens=0), metadata={'weight_version': 'default'})</strong>"
197197
],
198198
"text/plain": [
199199
"<IPython.core.display.HTML object>"
@@ -383,17 +383,17 @@
383383
"execution_count": 3,
384384
"metadata": {
385385
"execution": {
386-
"iopub.execute_input": "2025-10-05T15:47:55.530933Z",
387-
"iopub.status.busy": "2025-10-05T15:47:55.530776Z",
388-
"iopub.status.idle": "2025-10-05T15:47:55.791296Z",
389-
"shell.execute_reply": "2025-10-05T15:47:55.790698Z"
386+
"iopub.execute_input": "2025-10-05T18:55:04.520775Z",
387+
"iopub.status.busy": "2025-10-05T18:55:04.520636Z",
388+
"iopub.status.idle": "2025-10-05T18:55:04.760608Z",
389+
"shell.execute_reply": "2025-10-05T18:55:04.760218Z"
390390
}
391391
},
392392
"outputs": [
393393
{
394394
"data": {
395395
"text/html": [
396-
"<strong style='color: #00008B;'>The ancient Romans made significant contributions to the fields of science, philosophy, law, and literature. They are known for their engineering achievements, such as the construction of the Colosseum and the Pantheon, which are still standing today. The Romans also made important contributions to medicine, particularly through the development of the first medical school and the use of anesthesia.<br><br>In terms of philosophy, they were influential in the development of Roman law, which influenced later legal systems. Their legal system was based on natural law, which emphasized reason and justice over divine commandments.<br><br>In literature, they are credited with creating Latin literature, which is still spoken and</strong>"
396+
"<strong style='color: #00008B;'>The ancient Romans made significant contributions to various fields, including law, philosophy, science, and literature. They were known for their extensive use of Roman law, which influenced the development of modern legal systems. The Roman Empire is renowned for its vast territory and its strategic location on the Mediterranean Sea. It was a time of great cultural and intellectual flourishing, with the development of classical art, architecture, and philosophy. Rome's achievements in science, particularly in mathematics and astronomy, are also notable. The Roman Republic saw the rise of the Roman Republic and the Roman Empire, both of which lasted for centuries.</strong>"
397397
],
398398
"text/plain": [
399399
"<IPython.core.display.HTML object>"
@@ -442,18 +442,18 @@
442442
"execution_count": 4,
443443
"metadata": {
444444
"execution": {
445-
"iopub.execute_input": "2025-10-05T15:47:55.792888Z",
446-
"iopub.status.busy": "2025-10-05T15:47:55.792728Z",
447-
"iopub.status.idle": "2025-10-05T15:47:55.944673Z",
448-
"shell.execute_reply": "2025-10-05T15:47:55.943992Z"
445+
"iopub.execute_input": "2025-10-05T18:55:04.761836Z",
446+
"iopub.status.busy": "2025-10-05T18:55:04.761701Z",
447+
"iopub.status.idle": "2025-10-05T18:55:04.855268Z",
448+
"shell.execute_reply": "2025-10-05T18:55:04.854854Z"
449449
}
450450
},
451451
"outputs": [
452452
{
453453
"name": "stdout",
454454
"output_type": "stream",
455455
"text": [
456-
"Yes, that's correct. I am Qwen, a large language model created by Alibaba Cloud. My function is to assist users with various tasks, including text-based conversations and answers to specific questions. If this is a test, it could be for a different purpose or for training and development purposes. If you have any specific questions or need assistance with a particular topic, feel free to let me know!"
456+
"Yes, I am Qwen, created by Alibaba Cloud, and I am ready to assist with any questions or tasks you have. Please feel free to ask anything you might have and I'll do my best to help."
457457
]
458458
}
459459
],
@@ -483,17 +483,17 @@
483483
"execution_count": 5,
484484
"metadata": {
485485
"execution": {
486-
"iopub.execute_input": "2025-10-05T15:47:55.946114Z",
487-
"iopub.status.busy": "2025-10-05T15:47:55.945950Z",
488-
"iopub.status.idle": "2025-10-05T15:47:56.101382Z",
489-
"shell.execute_reply": "2025-10-05T15:47:56.100791Z"
486+
"iopub.execute_input": "2025-10-05T18:55:04.856468Z",
487+
"iopub.status.busy": "2025-10-05T18:55:04.856333Z",
488+
"iopub.status.idle": "2025-10-05T18:55:05.005715Z",
489+
"shell.execute_reply": "2025-10-05T18:55:05.005352Z"
490490
}
491491
},
492492
"outputs": [
493493
{
494494
"data": {
495495
"text/html": [
496-
"<strong style='color: #00008B;'>Response: Completion(id='a7e646729ae44bec8788a80de066dc7f', choices=[CompletionChoice(finish_reason='length', index=0, logprobs=None, text=' 1. United States - Washington D.C.\\n2. Canada - Ottawa\\n3. France - Paris\\n4. Germany - Berlin\\n5. Japan - Tokyo\\n6. Italy - Rome\\n7. Spain - Madrid\\n8. United Kingdom - London\\n9. Australia - Canberra\\n10. New Zealand', matched_stop=None)], created=1759679276, model='qwen/qwen2.5-0.5b-instruct', object='text_completion', system_fingerprint=None, usage=CompletionUsage(completion_tokens=64, prompt_tokens=8, total_tokens=72, completion_tokens_details=None, prompt_tokens_details=None, reasoning_tokens=0), metadata={'weight_version': 'default'})</strong>"
496+
"<strong style='color: #00008B;'>Response: Completion(id='71d999465bc94074887ab2e384fa8f54', choices=[CompletionChoice(finish_reason='length', index=0, logprobs=None, text=' 1. United States - Washington D.C.\\n2. Canada - Ottawa\\n3. France - Paris\\n4. Germany - Berlin\\n5. Japan - Tokyo\\n6. Italy - Rome\\n7. Spain - Madrid\\n8. United Kingdom - London\\n9. Australia - Canberra\\n10. New Zealand', matched_stop=None)], created=1759690505, model='qwen/qwen2.5-0.5b-instruct', object='text_completion', system_fingerprint=None, usage=CompletionUsage(completion_tokens=64, prompt_tokens=8, total_tokens=72, completion_tokens_details=None, prompt_tokens_details=None, reasoning_tokens=0), metadata={'weight_version': 'default'})</strong>"
497497
],
498498
"text/plain": [
499499
"<IPython.core.display.HTML object>"
@@ -532,17 +532,17 @@
532532
"execution_count": 6,
533533
"metadata": {
534534
"execution": {
535-
"iopub.execute_input": "2025-10-05T15:47:56.102854Z",
536-
"iopub.status.busy": "2025-10-05T15:47:56.102695Z",
537-
"iopub.status.idle": "2025-10-05T15:47:56.196433Z",
538-
"shell.execute_reply": "2025-10-05T15:47:56.195846Z"
535+
"iopub.execute_input": "2025-10-05T18:55:05.006932Z",
536+
"iopub.status.busy": "2025-10-05T18:55:05.006801Z",
537+
"iopub.status.idle": "2025-10-05T18:55:05.246891Z",
538+
"shell.execute_reply": "2025-10-05T18:55:05.246519Z"
539539
}
540540
},
541541
"outputs": [
542542
{
543543
"data": {
544544
"text/html": [
545-
"<strong style='color: #00008B;'>Response: Completion(id='94db7274c10b4c47857e3603d84f58f5', choices=[CompletionChoice(finish_reason='stop', index=0, logprobs=None, text=' Once upon a time, there was a space explorer named Dr. Sarah Chen. She had always been fascinated by the stars and the unknown galaxies, and she knew that the universe was vast and full of mysteries waiting to be discovered.', matched_stop='\\n\\n')], created=1759679276, model='qwen/qwen2.5-0.5b-instruct', object='text_completion', system_fingerprint=None, usage=CompletionUsage(completion_tokens=46, prompt_tokens=9, total_tokens=55, completion_tokens_details=None, prompt_tokens_details=None, reasoning_tokens=0), metadata={'weight_version': 'default'})</strong>"
545+
"<strong style='color: #00008B;'>Response: Completion(id='2747b7d3d7274d558f1a5c6e68f8d646', choices=[CompletionChoice(finish_reason='length', index=0, logprobs=None, text=\" Once upon a time, there was a space explorer named Captain Alpha. He had been exploring the stars for many years, and he had discovered many new planets and moons. One day, he decided to take a trip to a distant planet that was known for its unique and beautiful landscapes.\\nAs Captain Alpha approached the planet, he felt a sense of excitement and anticipation. He had heard rumors of the planet's incredible beauty, and he knew that it would be an incredible experience to see its natural wonders up close.\\nOn the way to the planet, Captain Alpha encountered many challenges. He had to navigate through treacherous terrain, climb steep mountains, and fight off hostile creatures. But he refused to give up, knowing that there was no other way to\", matched_stop=None)], created=1759690505, model='qwen/qwen2.5-0.5b-instruct', object='text_completion', system_fingerprint=None, usage=CompletionUsage(completion_tokens=150, prompt_tokens=9, total_tokens=159, completion_tokens_details=None, prompt_tokens_details=None, reasoning_tokens=0), metadata={'weight_version': 'default'})</strong>"
546546
],
547547
"text/plain": [
548548
"<IPython.core.display.HTML object>"
@@ -583,10 +583,10 @@
583583
"execution_count": 7,
584584
"metadata": {
585585
"execution": {
586-
"iopub.execute_input": "2025-10-05T15:47:56.197931Z",
587-
"iopub.status.busy": "2025-10-05T15:47:56.197775Z",
588-
"iopub.status.idle": "2025-10-05T15:47:56.233759Z",
589-
"shell.execute_reply": "2025-10-05T15:47:56.232865Z"
586+
"iopub.execute_input": "2025-10-05T18:55:05.248109Z",
587+
"iopub.status.busy": "2025-10-05T18:55:05.247978Z",
588+
"iopub.status.idle": "2025-10-05T18:55:05.277585Z",
589+
"shell.execute_reply": "2025-10-05T18:55:05.277074Z"
590590
}
591591
},
592592
"outputs": [],

0 commit comments

Comments
 (0)