V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
abcfreedom
V2EX  ›  程序员

gemma:2b 这个模型想要流畅运行起来需要什么配置的电脑

  •  
  •   abcfreedom · 57 天前 · 2109 次点击
    这是一个创建于 57 天前的主题,其中的信息可能已经有所发展或是发生改变。

    在 2c2g 的服务器上部署了个 gemma:2b ,响应太慢了,如果用家用台式机带 GPU 跑这个模型,什么样的配置才能流畅的进行问题交流?

    30 条回复    2024-03-07 10:19:29 +08:00
    13240284671
        1
    13240284671  
       57 天前
    2b 要求很低的,有个 6g 显卡就可以了
    crackidz
        2
    crackidz  
       57 天前
    2B 模型 CPU 跑就行...
    shinyzhu
        3
    shinyzhu  
       57 天前
    我的 M2 ,24G 非常流畅。
    coinbase
        4
    coinbase  
       57 天前
    m1 pro 16g ,gemma:7b 也可以跑
    noahlias
        5
    noahlias  
       57 天前
    我看了一下在我的 8G 3060TI 上 推理速度


    在我的 m1. pro 16g


    看来还是 cuda🐮
    vvhy
        6
    vvhy  
       57 天前
    1660s ,75 tokens/s
    yankebupt
        7
    yankebupt  
       57 天前
    @noahlias instruct 模型和 base 模型使用感觉上有什么差距么? 7b 能进行简单中文任务么?
    noahlias
        8
    noahlias  
       57 天前   ❤️ 1
    @yankebupt 中文你用 qwen 模型吧 那个效果好,instruct 在一些问题回答上会更好啊 当然也是答辩

    想看比较,自己去 llm leaderboard 看吧 ,
    https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard
    gongquanlin
        9
    gongquanlin  
       57 天前
    2b 的模型能干什么工作呀?感觉有点太笨了用起来
    hutng
        10
    hutng  
       57 天前
    ollama 普通 cpu 也能跑 7b ,但是感觉好垃圾呀,和 chatgpt 差十万八千里,类似于小爱同学这样的,也不知道是不是我用的姿势不对。
    Fish1024
        11
    Fish1024  
       57 天前
    内存大点就行,13b 也能跑,就是慢点,能用。
    abcfreedom
        12
    abcfreedom  
    OP
       56 天前 via Android
    @crackidz 有点慢呀感觉
    abcfreedom
        13
    abcfreedom  
    OP
       56 天前 via Android
    @shinyzhu 太强了
    abcfreedom
        14
    abcfreedom  
    OP
       56 天前 via Android
    @coinbase 正好我也有太 m1pro ,回头试试
    abcfreedom
        15
    abcfreedom  
    OP
       56 天前 via Android
    @noahlias 话说 amd 的卡能跑吗,手上有张 amd6900xt
    abcfreedom
        16
    abcfreedom  
    OP
       56 天前 via Android
    @vvhy 收到
    abcfreedom
        17
    abcfreedom  
    OP
       56 天前 via Android
    @noahlias 如果用作中英文翻译,哪个模型比较合适呢
    abcfreedom
        18
    abcfreedom  
    OP
       56 天前 via Android
    @gongquanlin 其实我也不太清楚,只知道这个模型对资源要求比较低,所以想着部署着玩一下
    abcfreedom
        19
    abcfreedom  
    OP
       56 天前 via Android
    @Fish1024 好嘞收到
    noahlias
        20
    noahlias  
       56 天前
    @abcfreedom 应该是可以的

    ollama 不过你得自己编译下 issue( https://github.com/ollama/ollama/issues/738)里面找解决方案
    或者你用 llama.cpp https://github.com/ggerganov/llama.cpp
    readme 里面是提到有支持 hipBlAS 的 https://github.com/ggerganov/llama.cpp#hipblas
    gongquanlin
        21
    gongquanlin  
       56 天前
    @abcfreedom #18 跑了一下 miniCPM-2b ,翻译、总结效果还不错,就是部分回答有点让人捉急哈哈~
    smalltong02
        22
    smalltong02  
       56 天前
    那是因为 ollama 加载的是 gguf 的量化模型。
    unclemcz
        23
    unclemcz  
       56 天前 via Android
    @gongquanlin miniCPM 这个模型我在 ollama 官网搜索不到,有具体链接提供吗? 我最近给自己的一个翻译软件增加 ollama 支持,测试用 qwen-4b ,效果很一般,想再找一个翻译效果好一点的。
    abcfreedom
        24
    abcfreedom  
    OP
       56 天前
    @gongquanlin 强 回头我也试试
    gongquanlin
        25
    gongquanlin  
       55 天前
    shinyzhu
        26
    shinyzhu  
       52 天前
    哦哦。原来用 verbose 就可以看到速度了啊。我的 MacBook Pro ( M2 ,8Core+10GPU ,24G 内存):

    ```
    ~ % ollama run gemma:2b --verbose

    total duration: 6.300357083s
    load duration: 896.708µs
    prompt eval count: 13 token(s)
    prompt eval duration: 201.698ms
    prompt eval rate: 64.45 tokens/s
    eval count: 284 token(s)
    eval duration: 6.096544s
    eval rate: 46.58 tokens/s
    ```
    crackidz
        27
    crackidz  
       51 天前
    @unclemcz https://ollama.com/roger/minicpm
    @abcfreedom 要看你的具体的配置,比如内存,CPU 。AMD 的支持很快会发 pre-release 了,速度据说比 NV 慢一点但是比 CPU 还是快多了
    unclemcz
        28
    unclemcz  
       51 天前 via Android
    @crackidz 我现在是 8g 的内存,3550h ,跑 qwen:7b ,短句的翻译需要 30s 左右。
    @abcfreedom qwen:4b 的速度快很多,但质量差 7b 太多。如果只是翻译,可以接各大翻译接口,百度腾讯华为都有,也都有免费额度。
    unclemcz
        29
    unclemcz  
       51 天前 via Android
    @abcfreedom 上楼再补充一下,翻译接口最大的问题是会吃单词,百度腾讯网易都有这个问题,所以如果有合适翻译的大模型,确实是优选。
    abcfreedom
        30
    abcfreedom  
    OP
       51 天前
    @unclemcz 我找了个 openai 中转的 api ,拿来对接了翻译,感觉还可以
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2624 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 15:36 · PVG 23:36 · LAX 08:36 · JFK 11:36
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.