modelscope / modelscope/ms-swift
gemma-4图像怎么设置最大token数量
Open
Nobody has claimed this yet.
question
stale
- Dominant language
- Python
- Stars
- 15.7k
- Forks
- 1.7k
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 136
Description
Checklist / 检查清单
- I have searched existing issues, and this is a new question or discussion topic. / 我已经搜索过现有的 issues,确认这是一个新的问题与讨论。
Question Description / 问题描述
全参微调gemma-4时,怎么控制每张图像的最大token数量呢?max_pixels似乎没作用,我设置50176后,最后每张图片token竟然是200+,但是在qwen3系列时,就是49个token
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the full-parameter Gemma-4 setup described in the issue with max_pixels set to 50176, then compare the resulting image-token count with the Qwen3 behavior. Trace the image preprocessing or tokenization path used by each model; done means explaining whether max_pixels should limit Gemma-4 to the requested size and fixing or documenting the discrepancy.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100