Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
LongCat_sglang
Commits
75031ce3
Commit
75031ce3
authored
Sep 08, 2025
by
chenych
Browse files
Add mem-fraction-static and update readme
parent
66d20db8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
README.md
README.md
+7
-3
start_sglang.sh
start_sglang.sh
+1
-0
No files found.
README.md
View file @
75031ce3
...
@@ -4,7 +4,8 @@
...
@@ -4,7 +4,8 @@
[
LongCat-Flash Technical Report
](
https://github.com/meituan-longcat/LongCat-Flash-Chat/blob/main/tech_report.pdf
)
[
LongCat-Flash Technical Report
](
https://github.com/meituan-longcat/LongCat-Flash-Chat/blob/main/tech_report.pdf
)
## 模型结构
## 模型结构
美团开源模型龙猫,一个强大且高效的语言模型,拥有总计 5600 亿个参数,采用了创新的专家混合(MoE)架构。该模型采用了一种动态计算机制,能够根据上下文需求激活 186 亿至 313 亿个参数(平均约 270 亿个),从而在计算效率和性能之间实现了优化。
美团开源模型龙猫,一个强大且高效的混合专家(MoE)语言模型,拥有总计 5600 亿个参数,采用了创新的专家混合(MoE)架构。
该模型采用了一种动态计算机制,根据 token 的重要性为其动态分配计算预算,能够根据上下文需求激活 186 亿至 313 亿个参数(总共 5600 亿),从而在计算效率和性能之间实现了优化。
<div
align=
center
>
<div
align=
center
>
<img
src=
"./doc/model.png"
/>
<img
src=
"./doc/model.png"
/>
...
@@ -13,9 +14,12 @@
...
@@ -13,9 +14,12 @@
## 算法原理
## 算法原理
LongCat-Flash 是基于两个关键原则进行设计和优化的:高效计算利用以及高效训练和推理。具体而言:
LongCat-Flash 是基于两个关键原则进行设计和优化的:高效计算利用以及高效训练和推理。具体而言:
(1)由于并非所有标记都同等重要,在 MoE 块中引入了零计算专家机制,根据标记的重要性动态分配计算预算,即根据上下文需求激活 186 亿至 313 亿个参数(总参数量为 5600 亿)。为确保计算负载一致,采用由 PID 控制器调整的专家偏差,使每个标记平均激活约 270 亿个参数。
(a) 零计算专家(Zero-computation Experts),支持动态计算预算分配,根据上下文需求,每个 token 激活 186 亿至 313 亿参数(平均 270 亿),优化了资源使用。
为确保计算负载一致,采用了由 PID 控制器调整的专家偏置,将每个 token 的平均激活参数维持在约 270 亿。
(2)由于在 MoE 模型扩展过程中通信开销成为瓶颈,引入了快捷连接的 MoE(ScMoE)设计,以扩大计算与通信的重叠窗口。结合定制的基础设施优化,该设计能够支持在数万个加速器上进行大规模训练,并实现高吞吐量和低延迟的推理。
(b) 快捷连接 MoE(Shortcut-connected MoE),扩大了计算-通信重叠窗口,结合定制的基础设施优化,该设计能够支持在数万个加速器上进行大规模训练,并实现高吞吐量和低延迟的推理。
综合评估表明,作为一个非思维(non-thinking)基础模型,LongCat-Flash 在其他领先模型中提供了极具竞争力的性能,并在智能体任务方面表现出卓越的优势。
<div
align=
center
>
<div
align=
center
>
<img
src=
"./doc/methods.png"
/>
<img
src=
"./doc/methods.png"
/>
...
...
start_sglang.sh
View file @
75031ce3
...
@@ -14,4 +14,5 @@ python3 -m sglang.launch_server \
...
@@ -14,4 +14,5 @@ python3 -m sglang.launch_server \
--node-rank
$NODE_RANK
\
--node-rank
$NODE_RANK
\
--host
127.0.0.2
\
--host
127.0.0.2
\
--port
8001
\
--port
8001
\
--mem-fraction-static
0.7
\
--dist-init-addr
x.x.x.x:20000
--dist-init-addr
x.x.x.x:20000
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment