[Model] add Step 3.7 Flash#46562
Conversation
Vision-language model with a per-layer rope_theta text decoder (yarn-only attention layers) and a 4x-downsampled ViT projector. Wires up Step3p7Config / Step3p7Model / Step3p7ForConditionalGeneration in the modular file, registers auto-class mappings, and ships a smoke-test script. Notable behaviors: - prepare_inputs_for_generation gates pixel_values on kwargs["is_first_iteration"] (Llava convention) since generate() pre-creates an empty cache, so neither past_key_values is None nor cache_position[0]==0 is a reliable prefill signal. - from_pretrained explicitly forwards _checkpoint_conversion_mapping as key_mapping because inheriting the class attribute alone is not enough. - Step3p7RotaryEmbedding shallow-copies the shared text config and deep-copies rope_parameters so per-layer rope_theta scalars do not leak between siblings.
|
hey @ltd0924 Great addition! Before I step in for review, can you pass over the PR and check if model matches the guidelines from this doc page (https://huggingface.co/docs/transformers/en/modular_transformers)? There is also a guide on adding processors if you scroll to the next doc page Currently I am seeing a few nits, such as the naming (we need to add the model name in all classes, e.g. instead of simply I will review after the above points are addressed and the CI is green :) Tag me when you're ready, for now I'll unsubscribe from getting notif |
|
CI Dashboard: View test results in Grafana |
|
[For maintainers] Suggested jobs to run (before merge) run-slow: auto, step3p7 |
|
View the CircleCI Test Summary for this PR: https://huggingface.co/spaces/transformers-community/circle-ci-viz?pr=46562&sha=166a10 |
|
|
Taking a look next week, thanks for the ping |
What does this PR do?
Fixes # (issue)
add new model Step 3.7 Flash
Code Agent Policy
The Transformers repo is currently being overwhelmed by a large number of PRs and issue comments written by
code agents. We are currently bottlenecked by our ability to review and respond to them. As a result,
we ask that new users do not submit pure code agent PRs at this time.
You may use code agents in drafting or to help you diagnose issues. We'd also ask autonomous "OpenClaw"-like agents
not to open any PRs or issues for the moment.
PRs that appear to be fully agent-written will probably be closed without review, and we may block users who do this
repeatedly or maliciously.
This is a rapidly-evolving situation that's causing significant shockwaves in the open-source community. As a result,
this policy is likely to be updated regularly in the near future. For more information, please read
CONTRIBUTING.md.Before submitting
Pull Request section?
to it if that's the case.
documentation guidelines, and
here are tips on formatting docstrings.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.
cc @zucchini-nlp