-
Notifications
You must be signed in to change notification settings - Fork 30.4k
Add LongCat-Flash #40730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add LongCat-Flash #40730
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! 🚀
Added:
|
This comment contains run-slow, running the specified jobs: models: ['models/longcat_flash'] |
[run-slow] longcat_flash |
# Initialize weights and apply final processing | ||
self.post_init() | ||
|
||
def forward( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doo you have to overwrite this one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes... because of num_hidden_layers
vs num_layers
(the actual number of layers being 56, there's 28 in the config under the num_layers
name and we iterate over num_hidden_layers
if I don't overwrite
[For maintainers] Suggested jobs to run (before merge) run-slow: auto, longcat_flash |
[run-slow] longcat_flash |
What does this PR do?
As per title, adds support for LongCat-Flash, a 560B MoE from Meituan.
Status:
modeling_longcat_flash
file allows loading checkpoint withouttrust_remote_code
, using a specificbase_model_tp_plan
found in the config. `from_pretrained('..., tp_plan='auto') loads the model properly.Launch snippet:
Note that you will need at least 2x8 H100 to launch the model with TP as follows
And you'll get
[Round 0] USER:Hello! What is the capital of France? What can you tell me about it? ASSISTANT:Hello! 😊 The capital of France is Paris, one of the most famous and beloved cities in the world. Here’s a quick overview of what makes Paris special:
1. Iconic Landmarks
2. Culture & Arts
3. Food & Cuisine
4. History & Politics
**