THUDM / CogVLM2

GPT4V-level open-source multi-modal model based on Llama3-8B
Apache License 2.0
2.1k stars 142 forks source link

triton在windows不太好装,请问有其他推理版本吗?目前在windows跑cogvlm2-llama3-chinese-chat-19B-int4会报错 #47

Closed praymich closed 5 months ago

praymich commented 5 months ago

Feature request / 功能建议

None

Motivation / 动机

None

Your contribution / 您的贡献

None

hugefrog commented 5 months ago

我也是,在windows折腾了半天triton没搞定。最开始试了llava,安装比较容易但是不支持中文ocr,cogVLM2支持,希望能支持windows。

zRzRzRzRzRzRzR commented 5 months ago

要用linux,triton库必须在linux运行

fmnijk commented 5 months ago

要用linux,triton库必须在linux运行

大佬,我找到这个解决了triton问题,也装了xformers https://huggingface.co/madbuda/triton-windows-builds

可以成功load模型,聊天时跳出缺少token_type_ids参数的错误,是transformers或pytorch版本不对吗,我用的是text-generation-webui,环境都是它默认的

Traceback (most recent call last):
  File "C:\Users\fmnijk\Desktop\text-generation-webui-main\modules\callbacks.py", line 61, in gentask
    ret = self.mfunc(callback=_callback, *args, **self.kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\fmnijk\Desktop\text-generation-webui-main\modules\text_generation.py", line 376, in generate_with_callback
    shared.model.generate(**kwargs)
  File "C:\Users\fmnijk\Desktop\text-generation-webui-main\installer_files\env\Lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\fmnijk\Desktop\text-generation-webui-main\installer_files\env\Lib\site-packages\transformers\generation\utils.py", line 1758, in generate
    result = self._sample(
             ^^^^^^^^^^^^^
  File "C:\Users\fmnijk\Desktop\text-generation-webui-main\installer_files\env\Lib\site-packages\transformers\generation\utils.py", line 2394, in _sample
    model_inputs = self.prepare_inputs_for_generation(input_ids, **model_kwargs)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: CogVLMForCausalLM.prepare_inputs_for_generation() missing 1 required positional argument: 'token_type_ids'
Output generated in 0.67 seconds (0.00 tokens/s, 0 tokens, context 60, seed 672988442)
YuanGYao commented 4 months ago

Windows上可以跑,就是比较折腾,需要安装cuda toolkit和其他一些东西,然后还需要设置各种环境变量。

hugefrog commented 4 months ago

其他都装好了,就是triton装不上

---- 回复的原邮件 ---- | 发件人 | Yao @.> | | 日期 | 2024年06月11日 16:24 | | 收件人 | @.> | | 抄送至 | @.>@.> | | 主题 | Re: [THUDM/CogVLM2] triton在windows不太好装,请问有其他推理版本吗?目前在windows跑cogvlm2-llama3-chinese-chat-19B-int4会报错 (Issue #47) |

Windows上可以跑,就是比较折腾,需要安装cuda toolkit和其他一些东西,然后还需要设置各种环境变量。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>