Skip to content

docs: add Llama 3.1 8B operator pruning profiles - #1057

Merged
baominghelly merged 1 commit into
masterfrom
docs/add-llama31-ops-configs
Nov 26, 2026
Merged

baominghelly merged 1 commit into
masterfrom
docs/add-llama31-ops-configs

Conversation

@baominghelly

Copy link
Copy Markdown
Collaborator

Summary

  • Add Llama 3.1 8B Instruct operator pruning profiles for NVIDIA, MetaX, Moore, and Ascend under scripts/configs/.
  • Document how to adapt the example JSON and build the Moore profile with its ATen providers.

Motivation

InfiniLM users can start from a tested operator selection for their backend and adjust it for their model. The example files capture both the operators needed at runtime and the C++ APIs needed to build InfiniLM.

Type of Change

  • docs (examples and usage guidance)

Platforms Affected

  • CPU (WITH_CPU, for Moore's generated dispatch)
  • NVIDIA (WITH_NVIDIA)
  • MetaX (WITH_METAX)
  • Moore (WITH_MOORE)
  • Ascend (WITH_ASCEND)
  • PyTorch C++ bindings (WITH_TORCH, for Moore's ATen providers)

Smoke Test Result

Built and installed each pruned C++ SDK with its JSON selected via -DINFINI_OPS_OPS. Ran the following InfiniLM inference smoke test with DEVICE set to nvidia, metax, moore, or ascend and MODEL_DIR pointing to the BF16 Meta-Llama-3.1-8B-Instruct checkpoint.

python examples/test_infer.py --device "$DEVICE" --model "$MODEL_DIR" \
  --tp 1 --batch-size 1 --attn default --top-k 1 --max-new-tokens 32 \
  --prompt 'List the first five prime numbers, then explain why 1 is not prime.'
NVIDIA A100     INFER_MAIN_OK
MetaX C550      completed {'prefill': 1, 'decode': 31}   INFER_EXIT_CODE=0
Moore S5000     Completed static steps {'prefill': 1, 'decode': 31}   INFER_EXIT=0
Ascend 910C     Completed model steps: {'prefill': 1, 'decode': 31}   INFER_EXIT_CODE=0

All four committed JSON files match the smoke-tested inputs. On the PR base, local checks confirmed JSON parsing, native provider selection, and git diff --check. The repository Python smoke and full suites were not run for these C++ SDK profiles.

Test Results on Supported Platforms

Platform Affected Build / Smoke Result Full Result / Notes
NVIDIA Yes Profile build and inference smoke passed 13 native slot 0 operators
Iluvatar No N/A - not affected N/A
MetaX Yes Profile build and inference smoke passed 13 native slot 0 operators
Cambricon No N/A - not affected N/A
Moore Yes Profile build and inference smoke passed 10 native slot 0 operators and 3 ATen slot 8 operators
Ascend Yes Profile build and inference smoke passed 13 native slot 0 operators

Benchmark / Performance Impact

N/A

Notes for Reviewers

  • The inference smoke used InfiniLM 12cc072a with InfiniCore 08d972c6 and its pinned InfiniOps c630ee54. It covered single-device BF16 inference with static attention, a static KV cache, and greedy decoding. Each profile keeps 42 additional entries as public_api_only for the InfiniLM build.
  • Moore selects ATen slot 8 for argmax, tril, and triu. Its smoke build used WITH_TORCH=ON and WITH_CPU=ON to satisfy generated dispatch references, plus a local FP16 type mapping fix on the pinned InfiniRT c0810cf. The corresponding upstream fix is InfiniRT #58.

@baominghelly
baominghelly requested a review from a team November 25, 2026 07:53
@baominghelly
baominghelly merged commit 3eceb3d into master Nov 26, 2026
11 of 27 checks passed
@baominghelly
baominghelly deleted the docs/add-llama31-ops-configs branch November 26, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant