[Feat] Adding Intern-S1#39722
Conversation
|
cc @zucchini-nlp for VLMs! |
|
Taking a look tomorrow |
zucchini-nlp
left a comment
There was a problem hiding this comment.
Hey, sorry for late review, got caught up in another model release.
The model looks very much like InternVL and I want us to re-use as much code as possible with modular. In long term it will make maintenance easier for us, and much much faster review process if we can spot the differences between models. I left comments below about which class can be re-used from where
Feel free to tag me when it is ready for re-review or if you need any assistance :)
|
@zucchini-nlp Hello, I've revised a new version as requested. However, regarding the usage of |
There was a problem hiding this comment.
Super clean after using the modular, thanks for iterating! There are some bits left especially moving all code into modular. We shouldn't be importing from other models unless it is in the modular file :)
Also, I will take a look at the can_record_output thing this week, would be nice to get it sorted
Update: Oh btw, let's make CI green and fix failing tests. You might need to rebase if unrelated test are failing
|
@zucchini-nlp Hello, I have made a round of fixes based on your comments and also left some issues I encountered. Could you please take a look when you have time to see if it is reasonable now? Regarding the test CI issues, I will fix them all together after the review structure is confirmed to be fine. |
|
Btw, the failing compile test can be skipped if the LM backbone is MoE. We don't have fullgraph compilation supported with MoE yet |
zucchini-nlp
left a comment
There was a problem hiding this comment.
LGTM, replied to you question above and we will ask core maintainer's review.
Totally forgot that we want to delete self.is_moe_model = False, taking a look at can_return_outputs now 👀
|
@zucchini-nlp Hello, I have fixed the CI, but there are three issues caused by numerical precision. I am not sure how to fix them or whether they need to be fixed. FAILED tests/models/interns1/test_modeling_interns1.py::InternS1ModelTest::test_eager_matches_sdpa_inference_08_fp32_pad_left_sdpa_kernels - ValueError: mean relative difference for hidden_states: 4.503e-05, torch atol = 1e-06, torch rtol = 0.0001
FAILED tests/models/interns1/test_modeling_interns1.py::InternS1ModelTest::test_eager_matches_sdpa_inference_12_fp32_pad_right_sdpa_kernels - ValueError: mean relative difference for hidden_states: 4.313e-05, torch atol = 1e-06, torch rtol = 0.0001
FAILED tests/models/interns1/test_modeling_interns1.py::InternS1ModelTest::test_left_padding_compatibility - AssertionError: Tensor-likes are not close!
`` |
|
Can you check |
|
Oke, feel free to skip them in that case with Let me just trigger first all tests and check if they fail in runners |
|
run-slow: interns1 |
Okay, looking forward to your results. |
|
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. |
|
run-slow: interns1 |
|
This comment contains run-slow, running the specified jobs: models: ['models/interns1'] |
|
I will trigger slow tests, can you not commit anything until it is finished running pls |
|
run-slow: interns1 |
|
This comment contains run-slow, running the specified jobs: models: ['models/interns1'] |
|
Tests are fine, only one failed due to OOM |
|
@zucchini-nlp Thank you. Waiting for the results of other reviewers. |
0512730 to
8be70b1
Compare
|
[For maintainers] Suggested jobs to run (before merge) run-slow: auto, intern_s1 |
|
[For maintainers] Suggested jobs to run (before merge) run-slow: auto, fast_vlm, intern_s1 |
|
[For maintainers] Suggested jobs to run (before merge) run-slow: auto, intern_s1 |
|
[For maintainers] Suggested jobs to run (before merge) run-slow: auto, intern_s1 |
|
The code is ready for review now. Please let us know your suggestions, thank you. @Cyrilvallez @ArthurZucker |
|
cc @ArthurZucker for tokenizers again after the refactor, not sure exactly how it works now? |
|
[For maintainers] Suggested jobs to run (before merge) run-slow: auto, intern_s1 |

Adding Intern-S1
This PR adds the support of codes for the Intern-S1 models. Please visit https://huggingface.co/internlm/Intern-S1
Features
Usage
Progress