Messi-Hua commited on
Commit
4635db3
·
verified ·
1 Parent(s): fe6e6ff

Delete deployment_guide.md

Browse files
Files changed (1) hide show
  1. deployment_guide.md +0 -113
deployment_guide.md DELETED
@@ -1,113 +0,0 @@
1
- # Intern-S2-Mobius Deployment Guide
2
-
3
- The Intern-S2-Mobius release is a 35B model stored in bfloat16 weight format. This guide provides deployment examples for the following configurations:
4
-
5
- - MTP speculative decoding (Recommended)
6
- - Basic serving without MTP
7
-
8
- > NOTE: The commands below are reference configurations. Inference frameworks are under active development, so use the latest framework documentation and your local validation results when tuning production deployments.
9
-
10
- ## LMDeploy
11
-
12
- Use the latest LMDeploy with Intern-S2-Mobius support. The examples below use single-GPU serving.
13
-
14
- - Serving With MTP (Recommended)
15
-
16
- ```bash
17
- lmdeploy serve api_server \
18
- internlm/Intern-S2-Mobius \
19
- --trust-remote-code \
20
- --backend pytorch \
21
- --tp 1 \
22
- --speculative-algorithm qwen3_5_mtp \
23
- --speculative-num-draft-tokens 4 \
24
- --dtype bfloat16 \
25
- --max-batch-size 64
26
- ```
27
-
28
- - Basic Serving Without MTP
29
-
30
- ```bash
31
- lmdeploy serve api_server \
32
- internlm/Intern-S2-Mobius \
33
- --trust-remote-code \
34
- --backend pytorch \
35
- --dtype bfloat16 \
36
- --tp 1
37
- ```
38
-
39
-
40
- ## Transformers
41
-
42
- Use a recent Transformers version with remote-code loading enabled.
43
-
44
- - Basic Inference
45
-
46
- ```python
47
- import torch
48
- from transformers import AutoModelForImageTextToText, AutoTokenizer
49
-
50
- model_path = "internlm/Intern-S2-Mobius"
51
-
52
- tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
53
- model = AutoModelForImageTextToText.from_pretrained(
54
- model_path,
55
- trust_remote_code=True,
56
- torch_dtype=torch.bfloat16,
57
- device_map="auto",
58
- ).eval()
59
-
60
- messages = [
61
- {"role": "user", "content": "Give me a short introduction to Intern-S2-Mobius."}
62
- ]
63
-
64
- text = tokenizer.apply_chat_template(
65
- messages,
66
- tokenize=False,
67
- add_generation_prompt=True,
68
- )
69
- inputs = tokenizer(text, return_tensors="pt").to(model.device)
70
-
71
- with torch.no_grad():
72
- output_ids = model.generate(
73
- **inputs,
74
- max_new_tokens=512,
75
- do_sample=True,
76
- temperature=0.8,
77
- top_p=1,
78
- )
79
-
80
- response_ids = output_ids[0][inputs["input_ids"].shape[-1]:]
81
- print(tokenizer.decode(response_ids, skip_special_tokens=True))
82
- ```
83
-
84
- ## vLLM
85
-
86
- Use the latest vLLM Docker image or source build with Intern-S2-Mobius support.
87
-
88
- - Serving With MTP (Recommended)
89
-
90
- ```bash
91
- vllm serve \
92
- internlm/Intern-S2-Mobius \
93
- --trust-remote-code \
94
- --tensor-parallel-size 2 \
95
- --reasoning-parser qwen3 \
96
- --enable-auto-tool-choice \
97
- --tool-call-parser qwen3_coder \
98
- --spec-method mtp \
99
- --spec-tokens 4
100
- ```
101
-
102
- - Basic Serving Without MTP
103
-
104
- ```bash
105
- vllm serve \
106
- internlm/Intern-S2-Mobius \
107
- --trust-remote-code \
108
- --tensor-parallel-size 2 \
109
- --reasoning-parser qwen3 \
110
- --enable-auto-tool-choice \
111
- --tool-call-parser qwen3_coder
112
- ```
113
-