Skip to content

Commit 0b99b66

Browse files
[Fix] add docstring
1 parent 4ff1c97 commit 0b99b66

14 files changed

+172
-124
lines changed

docs/source/en/_toctree.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,8 @@
521521
title: HGNet-V2
522522
- local: model_doc/ibert
523523
title: I-BERT
524+
- local: model_doc/interns1
525+
title: InternS1
524526
- local: model_doc/jamba
525527
title: Jamba
526528
- local: model_doc/jetmoe

docs/source/en/model_doc/interns1.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<!--Copyright 2025 The HuggingFace Team. All rights reserved.
2+
3+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
4+
the License. You may obtain a copy of the License at
5+
6+
http://www.apache.org/licenses/LICENSE-2.0
7+
8+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
9+
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
10+
specific language governing permissions and limitations under the License.
11+
12+
⚠️ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be
13+
rendered properly in your Markdown viewer.
14+
15+
-->
16+
17+
## InternS1Config
18+
19+
[[autodoc]] InternS1Config
20+
21+
## InternS1VisionConfig
22+
23+
[[autodoc]] InternS1VisionConfig
24+
25+
## InternS1Model
26+
27+
[[autodoc]] InternS1Model
28+
- forward
29+
30+
## InternS1ForConditionalGeneration
31+
32+
[[autodoc]] InternS1ForConditionalGeneration
33+
- forward
34+
35+
## InternS1VisionModel
36+
37+
[[autodoc]] InternS1VisionModel
38+
- forward
39+
40+
## InternS1Processor
41+
42+
[[autodoc]] InternS1Processor
43+
- __call__
44+
- decode
45+
- batch_decode
46+
47+
## InternS1Tokenizer
48+
49+
[[autodoc]] InternS1Tokenizer
50+
- __call__
51+
- tokenize
52+
- decode
53+
54+
## InternS1VideoProcessor
55+
56+
[[autodoc]] InternS1VideoProcessor

src/transformers/models/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,8 @@
161161
from .informer import *
162162
from .instructblip import *
163163
from .instructblipvideo import *
164-
from .internvl import *
165164
from .interns1 import *
165+
from .internvl import *
166166
from .jamba import *
167167
from .janus import *
168168
from .jetmoe import *

src/transformers/models/auto/configuration_auto.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -196,10 +196,10 @@
196196
("informer", "InformerConfig"),
197197
("instructblip", "InstructBlipConfig"),
198198
("instructblipvideo", "InstructBlipVideoConfig"),
199-
("internvl", "InternVLConfig"),
200-
("internvl_vision", "InternVLVisionConfig"),
201199
("interns1", "InternS1Config"),
202200
("interns1_vision", "InternS1VisionConfig"),
201+
("internvl", "InternVLConfig"),
202+
("internvl_vision", "InternVLVisionConfig"),
203203
("jamba", "JambaConfig"),
204204
("janus", "JanusConfig"),
205205
("jetmoe", "JetMoeConfig"),
@@ -602,10 +602,10 @@
602602
("informer", "Informer"),
603603
("instructblip", "InstructBLIP"),
604604
("instructblipvideo", "InstructBlipVideo"),
605-
("internvl", "InternVL"),
606-
("internvl_vision", "InternVLVision"),
607605
("interns1", "InternS1"),
608606
("interns1_vision", "InternS1Vision"),
607+
("internvl", "InternVL"),
608+
("internvl_vision", "InternVLVision"),
609609
("jamba", "Jamba"),
610610
("janus", "Janus"),
611611
("jetmoe", "JetMoe"),

src/transformers/models/auto/modeling_auto.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,10 @@
185185
("informer", "InformerModel"),
186186
("instructblip", "InstructBlipModel"),
187187
("instructblipvideo", "InstructBlipVideoModel"),
188-
("internvl", "InternVLModel"),
189-
("internvl_vision", "InternVLVisionModel"),
190188
("interns1", "InternS1Model"),
191189
("interns1_vision", "InternS1VisionModel"),
190+
("internvl", "InternVLModel"),
191+
("internvl_vision", "InternVLVisionModel"),
192192
("jamba", "JambaModel"),
193193
("janus", "JanusModel"),
194194
("jetmoe", "JetMoeModel"),
@@ -960,8 +960,8 @@
960960
("idefics2", "Idefics2ForConditionalGeneration"),
961961
("idefics3", "Idefics3ForConditionalGeneration"),
962962
("instructblip", "InstructBlipForConditionalGeneration"),
963-
("internvl", "InternVLForConditionalGeneration"),
964963
("interns1", "InternS1ForConditionalGeneration"),
964+
("internvl", "InternVLForConditionalGeneration"),
965965
("janus", "JanusForConditionalGeneration"),
966966
("kosmos-2", "Kosmos2ForConditionalGeneration"),
967967
("llama4", "Llama4ForConditionalGeneration"),

src/transformers/models/auto/processing_auto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@
8383
("idefics3", "Idefics3Processor"),
8484
("instructblip", "InstructBlipProcessor"),
8585
("instructblipvideo", "InstructBlipVideoProcessor"),
86-
("internvl", "InternVLProcessor"),
8786
("interns1", "InternS1Processor"),
87+
("internvl", "InternVLProcessor"),
8888
("janus", "JanusProcessor"),
8989
("kosmos-2", "Kosmos2Processor"),
9090
("kyutai_speech_to_text", "KyutaiSpeechToTextProcessor"),

src/transformers/models/auto/tokenization_auto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@
317317
("idefics3", ("LlamaTokenizer", "LlamaTokenizerFast" if is_tokenizers_available() else None)),
318318
("instructblip", ("GPT2Tokenizer", "GPT2TokenizerFast" if is_tokenizers_available() else None)),
319319
("instructblipvideo", ("GPT2Tokenizer", "GPT2TokenizerFast" if is_tokenizers_available() else None)),
320-
("internvl", ("Qwen2Tokenizer", "Qwen2TokenizerFast" if is_tokenizers_available() else None)),
321320
("interns1", ("InternS1Tokenizer", None)),
321+
("internvl", ("Qwen2Tokenizer", "Qwen2TokenizerFast" if is_tokenizers_available() else None)),
322322
(
323323
"jamba",
324324
(

src/transformers/models/auto/video_processing_auto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@
4949
("glm4v", "Glm4vVideoProcessor"),
5050
("instructblip", "InstructBlipVideoVideoProcessor"),
5151
("instructblipvideo", "InstructBlipVideoVideoProcessor"),
52-
("internvl", "InternVLVideoProcessor"),
5352
("interns1", "InternS1VideoProcessor"),
53+
("internvl", "InternVLVideoProcessor"),
5454
("llava_next_video", "LlavaNextVideoVideoProcessor"),
5555
("llava_onevision", "LlavaOnevisionVideoProcessor"),
5656
("qwen2_5_omni", "Qwen2VLVideoProcessor"),

src/transformers/models/interns1/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
from .configuration_interns1 import *
2222
from .modeling_interns1 import *
2323
from .processing_interns1 import *
24-
from .video_processing_interns1 import *
2524
from .tokenization_interns1 import *
25+
from .video_processing_interns1 import *
2626
else:
2727
import sys
2828

src/transformers/models/interns1/configuration_interns1.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121
class InternS1VisionConfig(PretrainedConfig):
2222
r"""
2323
This is the configuration class to store the configuration of a [`InternS1VisionModel`]. It is used to instantiate
24-
an InternS1VisionModel model according to the specified arguments, defining the model architecture.
24+
an InternS1VisionModel model according to the specified arguments, defining the model architecture. Instantiating a
25+
configuration with the defaults will yield a similar configuration to that of the Intern-S1.
26+
e.g. [internlm/Intern-S1](https://huggingface.co/internlm/Intern-S1)
2527
2628
Args:
2729
hidden_size (`int`, *optional*, defaults to 1024):
@@ -141,6 +143,8 @@ class InternS1Config(PretrainedConfig):
141143
r"""
142144
This is the configuration class to store the configuration of a [`InternS1ForConditionalGeneration`].
143145
It is used to instantiate a InternS1 model according to the specified arguments, defining the model architecture.
146+
Instantiating a configuration with the defaults will yield a similar configuration to that of the Intern-S1.
147+
e.g. [internlm/Intern-S1](https://huggingface.co/internlm/Intern-S1)
144148
145149
Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the
146150
documentation from [`PretrainedConfig`] for more information.

0 commit comments

Comments
 (0)