Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
change
sglang
Commits
e97e57e6
"docs/source/guide/distributed-partition.rst" did not exist on "39987bc59970289b774319f9e7ccd1ad57a1cb98"
Unverified
Commit
e97e57e6
authored
Apr 30, 2025
by
XinyuanTong
Committed by
GitHub
Apr 30, 2025
Browse files
Remove unused method `calculate_num_image_tokens` from qwen2_vl.py (#5783)
parent
9a6ad891
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
12 deletions
+0
-12
python/sglang/srt/models/qwen2_vl.py
python/sglang/srt/models/qwen2_vl.py
+0
-12
No files found.
python/sglang/srt/models/qwen2_vl.py
View file @
e97e57e6
...
@@ -442,18 +442,6 @@ class Qwen2VLForConditionalGeneration(nn.Module):
...
@@ -442,18 +442,6 @@ class Qwen2VLForConditionalGeneration(nn.Module):
"up_proj"
:
(
"gate_up_proj"
,
1
),
"up_proj"
:
(
"gate_up_proj"
,
1
),
}
}
def
calculate_num_image_tokens
(
self
,
image_grid_thw
:
Tuple
[
int
,
int
,
int
]):
processor
=
cached_get_processor
(
self
.
config
.
_name_or_path
)
grid_t
,
grid_h
,
grid_w
=
image_grid_thw
num_image_tokens
=
(
grid_t
*
grid_h
*
grid_w
//
processor
.
image_processor
.
merge_size
//
processor
.
image_processor
.
merge_size
)
return
num_image_tokens
def
__init__
(
def
__init__
(
self
,
self
,
config
:
Qwen2VLConfig
,
config
:
Qwen2VLConfig
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment