Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Test Gemma 4 -gpu model files before switching the catalog

未关闭
#219 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
dart

调研方向

Start with #216 and the catalog entry in lib/data/repositories/ai_model_repository_impl.dart. On a real phone, compare the generic and -gpu Gemma 4 E2B files on GPU, then force CPU with the -gpu file; repeat for E4B if E2B looks promising. Done means the load, prefill, decode, and memory comparisons support a clear decision about whether to switch, while confirming whether CPU fallback still works.

由索引模型根据 Issue 内容生成。

描述

enhancement P3-Low

What

Test whether the special GPU model files for Gemma 4 are better for us, before changing the catalog.

Why

Both Gemma 4 repos on Hugging Face ship two versions of the model:

Model What we download today Also available
Gemma 4 E2B gemma-4-E2B-it.litertlm gemma-4-E2B-it-gpu.litertlm
Gemma 4 E4B gemma-4-E4B-it.litertlm gemma-4-E4B-it-gpu.litertlm

Now that the app prefers the GPU on Android (#216), the -gpu file might load faster or run faster.

But the model card doesn't explain what's different, so we should not switch blindly.

Risk to check

The -gpu file may be GPU-only. If it is, our CPU fallback would break — phones where the GPU fails would not be able to run Gemma 4 at all. This has to be tested before switching.

How to test (on a real phone)

  1. Download both files for Gemma 4 E2B.
  2. Run the same prompt with each, on GPU, and compare from the log:
    • load time
    • prefill (reading the prompt) time
    • decode (writing the answer) speed
    • memory use
  3. Force CPU with the -gpu file and check it still loads. If it doesn't, we can't use it as the only download.
  4. Repeat for E4B if E2B looks good.

Decide

  • Faster and still works on CPU → switch the catalog URL in lib/data/repositories/ai_model_repository_impl.dart
  • Faster but GPU-only → keep the generic file (or download per device, which is a bigger change)
  • No real difference → keep the generic file and close this

Depends on #216.

主要语言
Dart
星标
2
派生
2
平均合并
1 天 35 分钟
30 天内合并 PR
36

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

basictech01/uniun 的其他 Issue

查看 basictech01/uniun 的全部 Issue

相似的 Issue

更多 Dart Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。