Skip to content

Llama 4 Scout and Maverick archs #1106

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Llama 4 Scout and Maverick archs #1106

wants to merge 5 commits into from

Conversation

MartinGleize
Copy link
Contributor

@MartinGleize MartinGleize commented Apr 10, 2025

What does this PR do? Please describe:
This PR adds Llama 4 Scout and Maverick support to fairseq2.

Test plan:

  • Llama 4 Scout native inference recipe support:
torchrun --standalone --nproc-per-node 8 --no-python \
    fairseq2 lm generate $SAVE_DIR --no-sweep-dir --config \
    model.name=$CKPT \
    tokenizer.name=$TOKENIZER \
    gang.tensor_parallel_size=8 \
    seq_generator.config.temperature=0.0 \
    seq_generator.batch_size=256 \
    dataset.path=$DATASET
  • No regression on Llama 3 inference recipe
  • Llama 4 Scout parity: verified against llama-stack on gsm8k test. 95% 0-shot acc.
  • Llama 4 Scout finetuning: recipe should work but no guarantee on effectiveness (token choice routing likely needs a load balancing loss, this will be another PR).

Does your PR introduce any breaking changes? If yes, please list them:
No

Check list:

  • Was the content of this PR discussed and approved via a GitHub issue? (no need for typos or documentation improvements)
  • Did you read the contributor guideline?
  • Did you make sure that your PR does only one thing instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you write any new necessary tests?
  • Did you verify new and existing tests pass locally with your changes?
  • Did you update the CHANGELOG? (no need for typos, documentation, or minor internal changes)

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Apr 10, 2025
@MartinGleize MartinGleize changed the title Llama 4 Scout and Maverick Llama 4 Scout and Maverick archs Apr 14, 2025
@MartinGleize MartinGleize marked this pull request as ready for review April 14, 2025 16:19
@MartinGleize MartinGleize requested a review from cbalioglu as a code owner April 14, 2025 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants