stevenkuang commited on
Commit
e9f6f15
·
verified ·
1 Parent(s): eae04e3

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +36 -0
README.md CHANGED
@@ -1,5 +1,7 @@
1
  ## 模型推理方式
2
 
 
 
3
  transformers>=5.6.0
4
 
5
  ```python
@@ -35,6 +37,40 @@ response = tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_spe
35
  print(response)
36
  ```
37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  ## 翻译指令推荐模板
39
 
40
  | 类型 | 模板 | 说明 |
 
1
  ## 模型推理方式
2
 
3
+ ### transformers
4
+
5
  transformers>=5.6.0
6
 
7
  ```python
 
37
  print(response)
38
  ```
39
 
40
+ ### vllm
41
+
42
+ Build vLLM from source:
43
+ ```bash
44
+ uv venv --python 3.12 --seed --managed-python
45
+ source .venv/bin/activate
46
+ git clone https://github.com/vllm-project/vllm.git
47
+ cd vllm
48
+ uv pip install --editable . --torch-backend=auto
49
+ ```
50
+
51
+ Start the vLLM server:
52
+
53
+ ```bash
54
+ vllm serve tencent/Hy-MT2-30B-A3B --tensor-parallel-size 1
55
+ ```
56
+
57
+ ### sglang
58
+
59
+ Build SGLang from source:
60
+ ```bash
61
+ git clone https://github.com/sgl-project/sglang
62
+ cd sglang
63
+ pip3 install pip --upgrade
64
+ pip3 install "transformers>=5.6.0"
65
+ pip3 install -e "python"
66
+ ```
67
+
68
+ Launch SGLang server:
69
+
70
+ ```bash
71
+ python3 -m sglang.launch_server --model tencent/Hy-MT2-30B-A3B --tp 1
72
+ ```
73
+
74
  ## 翻译指令推荐模板
75
 
76
  | 类型 | 模板 | 说明 |