lvkaokao commited on
Commit
f354200
·
verified ·
1 Parent(s): 896b12f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +24 -137
README.md CHANGED
@@ -5,159 +5,46 @@ pipeline_tag: text-generation
5
  tags:
6
  - transformers
7
  ---
8
- # LongCat-Flash-Lite-Sparse
9
-
10
- <div align="center">
11
- <img src="https://raw.githubusercontent.com/meituan-longcat/LongCat-Flash-Chat/main/figures/longcat_logo.svg"
12
- width="300"
13
- alt="LongCat Logo"/>
14
- </div>
15
-
16
- <hr>
17
 
18
- <div align="center" style="line-height: 1;">
19
- <a href="https://github.com/meituan-longcat/LongCat-Flash-Chat/blob/main/figures/wechat_official_accounts.png" target="_blank" style="margin: 2px;">
20
- <img alt="Wechat" src="https://img.shields.io/badge/WeChat-LongCat-brightgreen?logo=wechat&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
21
- </a>
22
- <a href="https://x.com/Meituan_LongCat" target="_blank" style="margin: 2px;">
23
- <img alt="Twitter Follow" src="https://img.shields.io/badge/Twitter-LongCat-white?logo=x&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
24
- </a>
25
- </div>
26
 
27
- <div align="center" style="line-height: 1;">
28
- <a href="https://huggingface.co/meituan-longcat/LongCat-Flash-Chat/blob/main/LICENSE" style="margin: 2px;">
29
- <img alt="License" src="https://img.shields.io/badge/License-MIT-f5de53?&color=f5de53" style="display: inline-block; vertical-align: middle;"/>
30
- </a>
31
- </div>
32
-
33
- <p align="center">
34
- <a href="https://arxiv.org/abs/2608.01662"><b>Tech Report</b> 📄</a>
35
- </p>
36
-
37
- ## Model Introduction
38
 
39
- LongCat-Flash-Lite-Sparse is a non-thinking Mixture-of-Experts (MoE) model with 69B total parameters and approximately 3B activated parameters per token. Built on [LongCat-Flash-Lite](https://huggingface.co/meituan-longcat/LongCat-Flash-Lite), it replaces dense MLA with **LongCat Sparse Attention (LSA)** and natively supports context lengths of up to 1M tokens. Compared with its dense predecessor, LongCat-Flash-Lite-Sparse improves long-context inference efficiency and agentic capabilities while preserving strong reasoning and general-knowledge performance.
40
 
41
- ### Key Features
42
 
43
- #### 🌟 LongCat Sparse Attention (LSA)
 
 
 
 
 
 
 
 
 
44
 
45
- LSA is a hardware-efficient sparse-attention framework that extends DeepSeek Sparse Attention (DSA) with three complementary indexing mechanisms:
46
 
47
- - **Streaming-Aware Indexing (SI)** reallocates part of the token-selection budget to a fixed sink and local sliding window while retaining dynamic sparse selection for the remaining tokens. This design converts fragmented KV access into more predictable, contiguous reads, improving HBM access efficiency and effective bandwidth.
48
- - **Cross-Layer Indexing (CLI)** exploits the stability of attention saliency across adjacent layers, allowing multiple consecutive layers to reuse the results of a single indexing pass at inference time. This capability is learned through cross-layer distillation during training.
49
- - **Hierarchical Indexing (HI)** adopts a coarse-to-fine, two-stage scoring scheme: it first recalls candidate blocks using coarse-grained scores and then performs fine-grained token selection within those blocks. By reducing the candidate space processed for each query, HI lowers indexing overhead and can be enabled at inference time without additional training.
50
 
51
- Together, these mechanisms enable LongCat-Flash-Lite-Sparse to process long contexts substantially more efficiently without compromising model quality.
52
 
 
53
 
54
- #### 🌟 Native 1M-Token Context Support
55
 
56
- To strengthen long-context capabilities, we update the long-context extension stage of LongCat-Flash-Lite with an enriched corpus and a progressive schedule that scales to 1,024K, enabling native support for context lengths up to 1M.
57
 
58
- #### 🌟 Strong Agentic Performance
59
 
60
- LongCat-Flash-Lite-Sparse delivers stronger performance than its dense predecessor on agentic coding, search, and tool-use tasks.
61
 
62
- Please refer to our [technical report](https://arxiv.org/abs/2608.01662) for details!
63
 
64
- ## Evaluation Results
65
 
66
- ## Standard Benchmarks
67
 
68
- | Benchmark | Lite-Dense | Lite-Sparse (w/o HI) | Lite-Sparse (w/ HI) |
69
- | ----------------------------- | ---------- | -------------------- | ------------------- |
70
- | **Agentic Coding** | | | |
71
- | SWE-Bench Verified(acc) | 54.40 | 68.20 | 65.20 |
72
- | SWE-Bench Pro(acc) | - | 40.63 | 39.40 |
73
- | SWE-Bench Multilingual(acc) | 38.10 | 59.33 | 56.00 |
74
- | TerminalBench 2.0(acc) | 33.75 | 33.70 | 32.58 |
75
- | **Agentic Tool Use** | | | |
76
- | τ²-Telecom(avg@4) | 72.80 | 95.18 | 96.05 |
77
- | VitaBench(avg@4) | 7.00 | 21.67 | 20.42 |
78
- | MCP-Atlas | - | 45.60 | 45.00 |
79
- | **Agentic Search** | | | |
80
- | BrowseComp(pass@1) | - | 48.62 | 48.18 |
81
- | BrowseComp-zh(pass@1) | - | 61.94 | 61.59 |
82
- | RWSearch(pass@1) | - | 68.50 | 66.00 |
83
- | **General Domains** | | | |
84
- | MMLU(acc) | 85.52 | 85.31 | 85.14 |
85
- | MMLU-Pro(acc) | 78.29 | 79.24 | 78.68 |
86
- | CMMLU(acc) | 82.48 | 84.25 | 84.51 |
87
- | C-Eval(acc) | 86.55 | 85.76 | 85.71 |
88
- | **Mathematical Reasoning** | | | |
89
- | GPQA-Diamond(avg@16) | 66.78 | 69.49 | 69.03 |
90
- | MATH500(acc) | 96.80 | 95.80 | 96.80 |
91
- | AIME 2026(avg@32) | - | 65.73 | 64.90 |
92
- | HMMT 2026 Feb(avg@32) | - | 40.53 | 41.47 |
93
- | BeyondAIME(avg@10) | - | 44.20 | 42.30 |
94
- | IMO AnswerBench(avg@4) | - | 49.38 | 46.69 |
95
 
96
- > **Note:** Lite-Dense denotes the LongCat-Flash-Lite, with metrics sourced from its [technical report](https://arxiv.org/abs/2601.21204). Lite-Sparse (w/o HI) and Lite-Sparse (w/ HI) denote the sparse variants evaluated without and with Hierarchical Indexing, respectively.
97
 
98
- ## Long-Context Benchmarks
99
-
100
- | Capability Dimension | Benchmark | Lite-Sparse (w/o HI) | Lite-Sparse (w/ HI) |
101
- | -------------------- | -------------------- | -------------------- | ------------------- |
102
- | **Foundational** | | | |
103
- | Retrieval | MRCR (8-needle) | 44.66 | 44.47 |
104
- | Aggregation | OOLong-Synth | 38.42 | 37.88 |
105
- | Multi-step Reasoning | GraphWalks Extend | 66.27 | 65.63 |
106
- | **Application** | | | |
107
- | Question Answering | LOFT Retrieval Extend| 43.75 | 44.38 |
108
- | In-context Learning | HELMET-ICL Extend | 91.63 | 90.50 |
109
- | Code Understanding | LongCodeQA | 62.30 | 59.37 |
110
- | Long-range Memory | AMemBench-ACU | 33.25 | 33.13 |
111
- | Holistic Assessment | LongBench-v2 | 52.50 | 53.64 |
112
- | Holistic Assessment | AA-LCR | 48.00 | 47.33 |
113
-
114
-
115
- ## Deployment
116
-
117
- We have implemented basic adaptations in SGLang ([PR](https://github.com/sgl-project/sglang/pull/32918)) to support the deployment of LongCat-Flash-Lite-Sparse.
118
-
119
- LongCat-Flash-Lite-Sparse can be served on a single node (e.g., 1xH20-141G).
120
-
121
- The server can be launched as follows:
122
-
123
- ```py
124
- python3 -m sglang.launch_server \
125
- --trust-remote-code \
126
- --model meituan-longcat/LongCat-Flash-Lite-Sparse \
127
- --host 0.0.0.0 \
128
- --port 30000 \
129
- --max-running-requests 64 \
130
- --mem-fraction-static 0.93 \
131
- --chunked-prefill-size 2048 \
132
- --nsa-prefill-backend fa3 \
133
- --kv-cache-dtype bfloat16
134
- ```
135
-
136
- ## License Agreement
137
-
138
- This repository, including both the model weights and the source code, is released under the **MIT License**.
139
-
140
- Any contributions to this repository are licensed under the MIT License, unless otherwise stated. This license does not grant any rights to use Meituan trademarks or patents.
141
-
142
- For details, see the [LICENSE](./LICENSE) file.
143
-
144
- ## Usage Considerations
145
-
146
- This model has not been specifically designed or comprehensively evaluated for every possible downstream application.
147
-
148
- Developers should take into account the known limitations of large language models, including performance variations across different languages, and carefully assess accuracy, safety, and fairness before deploying the model in sensitive or high-risk scenarios.
149
- It is the responsibility of developers and downstream users to understand and comply with all applicable laws and regulations relevant to their use case, including but not limited to data protection, privacy, and content safety requirements.
150
-
151
- Nothing in this Model Card should be interpreted as altering or restricting the terms of the MIT License under which the model is released.
152
-
153
- <!-- ## Citation
154
-
155
- We kindly encourage citation of our work if you find it useful.
156
-
157
- ```
158
-
159
- ``` -->
160
-
161
- ## Contact
162
-
163
- Please contact us at <a href="mailto:longcat-team@meituan.com">longcat-team@meituan.com</a> or open an issue if you have any questions.
 
5
  tags:
6
  - transformers
7
  ---
8
+ This model is an int4 model with group_size 128 of [LongCat-Flash-Lite-Sparse](https://huggingface.co/meituan-longcat/LongCat-Flash-Lite-Sparse) generated by [intel/auto-round](https://github.com/intel/auto-round) with RTN mode. Please follow the license of the original model.
 
 
 
 
 
 
 
 
9
 
 
 
 
 
 
 
 
 
10
 
 
 
 
 
 
 
 
 
 
 
 
11
 
 
12
 
13
+ ## Generate the Model
14
 
15
+ ~~~bash
16
+ auto-round \
17
+ meituan-longcat/LongCat-Flash-Lite-Sparse \
18
+ --model_free \
19
+ --scheme MXFP8 \
20
+ --ignore_layers "lm_head,embed,self_attn,mlps,router,mtp" \
21
+ --layer_config '{mlp.experts:{bits:4,data_type:mx_fp}}' \
22
+ --format llm_compressor \
23
+ --output_dir ./LongCat-Flash-Lite-Sparse-MXFP4
24
+ ~~~
25
 
 
26
 
 
 
 
27
 
28
+ ## Ethical Considerations and Limitations
29
 
30
+ The model can produce factually incorrect output, and should not be relied on to produce factually accurate information. Because of the limitations of the pretrained model and the finetuning datasets, it is possible that this model could generate lewd, biased or otherwise offensive outputs.
31
 
32
+ Therefore, before deploying any applications of the model, developers should perform safety testing.
33
 
34
+ ## Caveats and Recommendations
35
 
36
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.
37
 
38
+ Here are a couple of useful links to learn more about Intel's AI software:
39
 
40
+ - [Intel Neural Compressor](https://github.com/intel/neural-compressor)
41
 
42
+ ## Disclaimer
43
 
44
+ The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. Please consult an attorney before using this model for commercial purposes.
45
 
46
+ ## Cite
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
+ @article{cheng2023optimize, title={Optimize weight rounding via signed gradient descent for the quantization of llms}, author={Cheng, Wenhua and Zhang, Weiwei and Shen, Haihao and Cai, Yiyang and He, Xin and Lv, Kaokao and Liu, Yi}, journal={arXiv preprint arXiv:2309.05516}, year={2023} }
49
 
50
+ [arxiv](https://arxiv.org/abs/2309.05516) [github](https://github.com/intel/auto-round)