Skip to content

Fix RoPE scaling factor propagation in Genie config - #340

Open
Ricardo Alves de Souza (ricardoasouz) wants to merge 1 commit into
qualcomm:mainfrom
ricardoasouz:dev/ricardoasouz/propagate-rope-scaling-factor
Open

Fix RoPE scaling factor propagation in Genie config#340
Ricardo Alves de Souza (ricardoasouz) wants to merge 1 commit into
qualcomm:mainfrom
ricardoasouz:dev/ricardoasouz/propagate-rope-scaling-factor

Conversation

@ricardoasouz

Copy link
Copy Markdown

Summary

Propagate the model-provided RoPE scaling factor into the generated Genie config instead of always hardcoding 8.0.

This preserves the existing fallback behavior when factor is absent while allowing models such as Llama 3.2 to emit their configured value, such as 32.0.

This addresses the Genie config RoPE scaling factor propagation reported in #337. It does not attempt to address the separate v68 compile/runtime degeneration described in that issue.

Changes

  • Replace the hardcoded Genie RoPE scaling factor:

    • from 8.0
    • to rope_scaling.get("factor", 8.0)
  • Preserve backward compatibility by keeping 8.0 as the fallback when factor is not provided.

  • Add a regression test verifying that the configured RoPE scaling factor is preserved in the generated Genie config.

Test Plan

Ran the targeted regression test:

python -m pytest \
  src/qai_hub_models/models/_shared/llm/test_llm_helpers.py \
  -v

1 passed in 0.03s

Additional validation:

git diff --check

passed.

Pre-commit results:

  • license check: passed
  • YAML check: passed
  • trailing whitespace check: passed
  • merge conflict check: passed
  • AWS credential detection: passed
  • GitHub Actions lint: passed
  • shellcheck: passed
  • Ruff checks: passed
  • Ruff formatting: passed
  • pydoclint: passed

The full-repository mypy hooks run successfully but report existing type-checking errors in unrelated files across the repository. No reported mypy errors are in the files changed by this PR.

Related to #337.

Signed-off-by: Ricardo Alves de Souza <ricardoasouz@hotmail.com>
@ricardoasouz
Ricardo Alves de Souza (ricardoasouz) force-pushed the dev/ricardoasouz/propagate-rope-scaling-factor branch from fc2db59 to d72108c Compare August 27, 2026 00:13
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