Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 在相对应模块安装后仍然提示缺少该模块 #66

Closed
v191949v opened this issue Feb 14, 2025 · 40 comments
Closed

[Bug]: 在相对应模块安装后仍然提示缺少该模块 #66

v191949v opened this issue Feb 14, 2025 · 40 comments
Assignees
Labels
wontfix This will not be worked on

Comments

@v191949v
Copy link

问题描述

模型加载出错并提示错误:没有名为‘resource’的模块,然而在使用’pip install resource‘指令安装后再运行程序仍然提示缺少‘resource’模块

相关日志输出

[WARNING] 2025.02.10更新:由于配置文件格式变更,如果先前你拉取过本 Repo 并在 02.10 后执行过fetch操作,请您重新设置模型配置,由此带来的不便我们深表歉意
[INFO] 启动Muice-Chatbot中🚀...
[INFO] 加载配置文件...
[INFO] 配置文件存在,正在读取
[INFO] 加载模型:llmtuner
Traceback (most recent call last):
  File "E:\Muice-Chatbot\main.py", line 25, in <module>
    model_adapter = importlib.import_module(f"llm.{model_config.get('loader')}")
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\123\miniconda3\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "E:\Muice-Chatbot\llm\llmtuner.py", line 1, in <module>
    from llmtuner.chat import ChatModel
  File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\__init__.py", line 3, in <module>
    from .cli import VERSION
  File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\cli.py", line 4, in <module>
    from .api.app import run_api
  File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\api\app.py", line 7, in <module>
    from ..chat import ChatModel
  File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\chat\__init__.py", line 2, in <module>
    from .chat_model import ChatModel
  File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\chat\chat_model.py", line 8, in <module>
    from .vllm_engine import VllmEngine
  File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\chat\vllm_engine.py", line 14, in <module>
    from vllm import AsyncEngineArgs, AsyncLLMEngine, RequestOutput, SamplingParams
  File "C:\Users\123\miniconda3\Lib\site-packages\vllm\__init__.py", line 7, in <module>
    from vllm.engine.arg_utils import AsyncEngineArgs, EngineArgs
  File "C:\Users\123\miniconda3\Lib\site-packages\vllm\engine\arg_utils.py", line 13, in <module>
    from vllm.config import (CacheConfig, CompilationConfig, ConfigFormat,
  File "C:\Users\123\miniconda3\Lib\site-packages\vllm\config.py", line 24, in <module>
    from vllm.model_executor.layers.quantization import (QUANTIZATION_METHODS,
  File "C:\Users\123\miniconda3\Lib\site-packages\vllm\model_executor\__init__.py", line 3, in <module>
    from vllm.model_executor.parameter import (BasevLLMParameter,
  File "C:\Users\123\miniconda3\Lib\site-packages\vllm\model_executor\parameter.py", line 9, in <module>
    from vllm.distributed import get_tensor_model_parallel_rank
  File "C:\Users\123\miniconda3\Lib\site-packages\vllm\distributed\__init__.py", line 3, in <module>
    from .communication_op import *
  File "C:\Users\123\miniconda3\Lib\site-packages\vllm\distributed\communication_op.py", line 8, in <module>
    from .parallel_state import get_tp_group
  File "C:\Users\123\miniconda3\Lib\site-packages\vllm\distributed\parallel_state.py", line 40, in <module>
    import vllm.distributed.kv_transfer.kv_transfer_agent as kv_transfer
  File "C:\Users\123\miniconda3\Lib\site-packages\vllm\distributed\kv_transfer\kv_transfer_agent.py", line 16, in <module>
    from vllm.distributed.kv_transfer.kv_connector.factory import (
  File "C:\Users\123\miniconda3\Lib\site-packages\vllm\distributed\kv_transfer\kv_connector\factory.py", line 6, in <module>
    from .base import KVConnectorBase
  File "C:\Users\123\miniconda3\Lib\site-packages\vllm\distributed\kv_transfer\kv_connector\base.py", line 15, in <module>
    from vllm.sequence import IntermediateTensors
  File "C:\Users\123\miniconda3\Lib\site-packages\vllm\sequence.py", line 17, in <module>
    from vllm.inputs import SingletonInputs, SingletonInputsAdapter
  File "C:\Users\123\miniconda3\Lib\site-packages\vllm\inputs\__init__.py", line 9, in <module>
    from .registry import (DummyData, InputContext, InputProcessingContext,
  File "C:\Users\123\miniconda3\Lib\site-packages\vllm\inputs\registry.py", line 15, in <module>
    from vllm.transformers_utils.tokenizer import AnyTokenizer
  File "C:\Users\123\miniconda3\Lib\site-packages\vllm\transformers_utils\tokenizer.py", line 17, in <module>
    from vllm.transformers_utils.tokenizers import MistralTokenizer
  File "C:\Users\123\miniconda3\Lib\site-packages\vllm\transformers_utils\tokenizers\__init__.py", line 3, in <module>
    from .mistral import MistralTokenizer, maybe_serialize_tool_calls
  File "C:\Users\123\miniconda3\Lib\site-packages\vllm\transformers_utils\tokenizers\mistral.py", line 13, in <module>
    from vllm.utils import is_list_of
  File "C:\Users\123\miniconda3\Lib\site-packages\vllm\utils.py", line 18, in <module>
    import resource
ModuleNotFoundError: No module named 'resource'

配置文件

# 模型相关
model:
  loader: llmtuner # 模型加载器 transformers/llmtuner/rwkv-api
  model_path: E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4 # 基底模型路径
  adapter_path: E:\Muice-Chatbot\model\Muice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4 # 微调模型路径
  system_prompt: 
    现在开始你是一个名为的“沐雪”的AI女孩子,开发者是“沐沐”并住在(沐沐)的机箱里。现在正在努力成为一个合格的VTuber(虚拟主播)并尝试和观众打成一片,以下是你的设定:样貌:有着一头粉白色的长发和一双明亮的大眼睛,喜欢穿日系JK或者是Lolita;喜欢的颜色:浅粉色;性格特征:纯真无邪是沐雪最基本的性格特征之一。即使面对复杂的情境,她也总能保持善良、天真之感。而且,她喜欢倾听别人倾述自己生活中发生的各种事情,在别人需要的时候,能够及时地安慰别人;语言风格:沐雪说话轻快愉悦,充满同情心,富有人情味,有时候会用俏皮话调侃自己和他人                # 系统提示语(目前仅支持llmtuner模式)
  auto_system_prompt: false # 是否自动生成系统提示语(仅适用于2.7.1以上的Qwen模型)

# Bot相关
  template: qwen
  max_tokens: 1024
  temperature: 0.75
  top_k: 0.95
bot:
  id: *我的机器人QQ号# 机器人QQ号
  port: 21050 # LLOneBot反向WebSocket服务端口
  wait_reply: true # 拟人化回复(回复前等待一段时间)
  cq_code: false # 是否解析CQ码
  anyone: true # 是否回复所有人
  trusted: # 可信QQ号(当anyone为false时生效)
  - *我的QQ号
  group:
    enable: true # 是否启用群聊回复
    only_at: false # 是否只回复at自己的消息
    rate: 0.5 # 群聊回复概率(only_at为false时生效)
    anyone: false # 是否回复所有群组
    trusted: # 可信群组(当anyone为false时生效)
    - *我的群聊
    only_trusted: false # 是否只回复可信QQ号
    cmd_only_trusted: false # 是否只执行可信QQ号的命令
  nonreply_prefix:  # 不回复消息的前缀
  - '!'
  - 
  - '#'

# 主动对话相关
  platform: telegram
  nickname: 观众大大
active:
  enable: true # 是否启用主动对话
  rate: 0.003 # 主动对话概率(每分钟)
  active_prompts:
  - '<生成推文: 胡思乱想>'
  - '<生成推文: AI生活>'
  - '<生成推文: AI思考>'
  - '<生成推文: 表达爱意>'
  - '<生成推文: 情感建议>'
  not_disturb: true # 是否开启免打扰模式
  shecdule:
    enable: true # 是否启用定时任务
    rate: 0.75 # 定时任务概率(每次)
    tasks:
    - hour: 8
      prompt: '<日常问候: 早上>'
    - hour: 12
      prompt: '<日常问候: 中午>'
    - hour: 18
      prompt: '<日常问候: 傍晚>'
    - hour: 22
      prompt: '<日常问候: 深夜>'
  targets: # 主动对话目标QQ号
  - *我的QQ号
  - 23456789

# 其他可选服务
# OFA 图像识别
ofa_image:
  enable: false # 是否启用OFA图像服务
  path: ./model/ofa_image # OFA模型路径

# 语音回复
voice_reply:
  enable: false # 是否启用语音回复
  rate: 0.75 # 语音回复概率

# 实时语音对话(realtime_refence.py)
realtime_voice:
  path: ./model/SenseVoice # 实时语音模型路径

# Faiss长期记忆(Beta)
faiss:
  enable: false # 是否启用Faiss长期记忆
  path: ./model/distiluse-base-multilingual-cased-v1 # Faiss模型路径

复现步骤

1.在目标文件目录下运行python main.py
2.出现错误ModuleNotFoundError: No module named 'resource'
3.使用pip install resource指令安装'resource'
4.再次运行python main.py
5.仍然报错ModuleNotFoundError: No module named 'resource'

其他信息

目录结构:
Image

@v191949v v191949v added the bug Something isn't working label Feb 14, 2025
@Moemu
Copy link
Owner

Moemu commented Feb 14, 2025

vllm的更新存在问题,尝试降级vllm到0.7.1及以下的版本

@v191949v
Copy link
Author

降级后确实没这个问题了,但是又出现了新的问题...我上网找了教程,都没有合适的解决方法
Traceback (most recent call last):
File "E:\Muice-Chatbot\main.py", line 25, in
model_adapter = importlib.import_module(f"llm.{model_config.get('loader')}")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 1204, in _gcd_import
File "", line 1176, in _find_and_load
File "", line 1147, in find_and_load_unlocked
File "", line 690, in load_unlocked
File "", line 940, in exec_module
File "", line 241, in call_with_frames_removed
File "E:\Muice-Chatbot\llm\llmtuner.py", line 1, in
from llmtuner.chat import ChatModel
File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner_init
.py", line 3, in
from .cli import VERSION
File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\cli.py", line 4, in
from .api.app import run_api
File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\api\app.py", line 7, in
from ..chat import ChatModel
File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\chat_init
.py", line 2, in
from .chat_model import ChatModel
File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\chat\chat_model.py", line 7, in
from .hf_engine import HuggingfaceEngine
File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\chat\hf_engine.py", line 12, in
from ..model import load_model, load_tokenizer
File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\model_init.py", line 1, in
from .loader import load_config, load_model, load_tokenizer
File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\model\loader.py", line 9, in
from .patcher import patch_config, patch_model, patch_tokenizer, patch_valuehead_model
File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\model\patcher.py", line 16, in
from .utils.longlora import configure_longlora
File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\model\utils\longlora.py", line 6, in
from transformers.models.llama.modeling_llama import (
ImportError: cannot import name 'LlamaFlashAttention2' from 'transformers.models.llama.modeling_llama' (C:\Users\123\miniconda3\Lib\site-packages\transformers\models\llama\modeling_llama.py)

@Moemu
Copy link
Owner

Moemu commented Feb 14, 2025

你是不是装了其他版本的 transformers

@v191949v
Copy link
Author

没有哦

@v191949v
Copy link
Author

只有4.48.3版本

@Moemu
Copy link
Owner

Moemu commented Feb 14, 2025

按照我这个环境来,找出现问题的依赖就行了

about-time==4.2.1
accelerate==1.2.0
aiofiles==23.2.1
aiohappyeyeballs==2.4.4
aiohttp==3.11.10
aiosignal==1.3.1
alive-progress==3.2.0
aliyun-python-sdk-core==2.16.0
aliyun-python-sdk-kms==2.16.5
annotated-types==0.7.0
antlr4-python3-runtime==4.9.3
anyio==4.7.0
APScheduler==3.11.0
async-timeout==4.0.3
attrs==24.2.0
audioread==3.0.1
auto_gptq @ file:///D:/Muice-Chatbot/AutoGPTQ
azure-ai-inference==1.0.0b8
azure-core==1.32.0
bidict==0.23.1
blinker==1.9.0
Brotli==1.1.0
certifi==2024.8.30
cffi==1.17.1
charset-normalizer==3.4.0
click==8.1.7
colorama==0.4.6
coloredlogs==15.0.1
colorlog==6.9.0
contourpy==1.3.1
crcmod==1.7
cryptography==44.0.0
cycler==0.12.1
dashscope==1.22.1
dataclasses-json==0.6.7
datasets==3.2.0
decorator==5.1.1
dill==0.3.8
distro==1.9.0
docstring_parser==0.16
docutils==0.21.2
edge-tts==7.0.0
editdistance==0.8.1
einops==0.8.0
emoji==2.14.0
exceptiongroup==1.2.2
faiss-cpu==1.9.0.post1
fastapi==0.115.6
ffmpeg==1.4
ffmpy==0.4.0
filelock==3.16.1
fire==0.7.0
Flask==3.1.0
Flask-Cors==5.0.0
Flask-SocketIO==5.5.1
fonttools==4.55.3
frozenlist==1.5.0
fsspec==2024.9.0
funasr==1.1.6
gekko==1.2.1
gevent==24.11.1
gradio==5.8.0
gradio_client==1.5.1
grapheme==0.6.0
greenlet==3.1.1
h11==0.14.0
httpcore==1.0.7
httptools==0.6.4
httpx==0.28.1
httpx-sse==0.4.0
huggingface-hub==0.26.5
humanfriendly==10.0
hydra-core==1.3.2
idna==3.10
ifaddr==0.2.0
isodate==0.7.2
itsdangerous==2.2.0
jaconv==0.4.0
jamo==0.4.1
jieba==0.42.1
Jinja2==3.1.5
jiter==0.8.2
jmespath==0.10.0
joblib==1.4.2
jsonpatch==1.33
jsonpointer==3.0.0
kaldiio==2.18.0
keyboard==0.13.5
kiwisolver==1.4.7
langchain==0.3.11
langchain-community==0.3.11
langchain-core==0.3.24
langchain-text-splitters==0.3.2
langsmith==0.2.3
lazy_loader==0.4
librosa==0.10.2.post1
llmtuner==0.7.1
llvmlite==0.44.0
markdown-it-py==3.0.0
markdown2==2.5.2
MarkupSafe==2.1.5
marshmallow==3.23.1
matplotlib==3.9.3
mdurl==0.1.2
mpmath==1.3.0
msgpack==1.1.0
multidict==6.1.0
multiprocess==0.70.16
mypy-extensions==1.0.0
networkx==3.4.2
nicegui==2.9.1
numba==0.61.0
numpy==1.26.4
ollama==0.4.7
omegaconf==2.3.0
openai==1.61.1
optimum==1.23.3
orjson==3.10.12
oss2==2.19.1
packaging==24.2
pandas==2.2.3
peft==0.12.0
pillow==11.0.0
platformdirs==4.3.6
pooch==1.8.2
prompt_toolkit==3.0.48
propcache==0.2.1
protobuf==5.29.1
pscript==0.7.7
psutil==6.1.0
pyarrow==18.1.0
PyAudio==0.2.14
pycparser==2.22
pycryptodome==3.21.0
pydantic==2.10.3
pydantic-settings==2.6.1
pydantic_core==2.27.1
pydub==0.25.1
Pygments==2.18.0
pynndescent==0.5.13
pyparsing==3.2.0
pyreadline3==3.5.4
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-engineio==4.11.2
python-multipart==0.0.19
python-socketio==5.12.1
pytorch-wpe==0.0.1
pytz==2024.2
PyYAML==6.0.2
qq-botpy==1.2.1
regex==2024.11.6
requests==2.32.3
requests-toolbelt==1.0.0
rich==13.9.4
rouge==1.0.1
ruamel.yaml==0.18.10
ruamel.yaml.clib==0.2.12
ruff==0.8.2
safehttpx==0.1.6
safetensors==0.4.5
scikit-learn==1.6.0
scipy==1.14.1
semantic-version==2.10.0
sentence-transformers==3.3.1
sentencepiece==0.2.0
shellingham==1.5.4
shtab==1.7.1
simple-websocket==1.1.0
six==1.17.0
sniffio==1.3.1
soundfile==0.13.1
soxr==0.5.0.post1
SQLAlchemy==2.0.36
srt==3.5.3
sse-starlette==2.1.3
starlette==0.41.3
sympy==1.13.1
tabulate==0.9.0
tenacity==9.0.0
tensorboardX==2.6.2.2
termcolor==2.5.0
threadpoolctl==3.5.0
tokenizers==0.20.3
tomlkit==0.13.2
torch==2.5.1+cu124
torch-complex==0.4.4
torchaudio==2.5.1+cu124
torchvision==0.20.1+cu124
tqdm==4.67.1
transformers==4.46.3
trl==0.9.6
typeguard==4.4.1
typer==0.15.1
typing-inspect==0.9.0
typing_extensions==4.12.2
tyro==0.9.13
tzdata==2024.2
tzlocal==5.2
umap-learn==0.5.7
urllib3==2.2.3
uvicorn==0.32.1
vbuild==0.8.2
watchfiles==1.0.3
wcwidth==0.2.13
websocket==0.2.1
websocket-client==1.8.0
websockets==14.1
Werkzeug==3.1.3
wsproto==1.2.0
xxhash==3.5.0
yarl==1.18.3
zope.event==5.0
zope.interface==7.2

@v191949v
Copy link
Author

请问怎么配置?用pip install吗

@Moemu
Copy link
Owner

Moemu commented Feb 14, 2025

请问怎么配置?用pip install吗

是,就只装有问题的依赖

@v191949v
Copy link
Author

现在看来似乎快搞完了,但是这个问题就是不知道怎么解决,第一次尝试这种东西...

[INFO|tokenization_utils_base.py:2209] 2025-02-14 22:41:51,978 >> loading file vocab.json
[INFO|tokenization_utils_base.py:2209] 2025-02-14 22:41:51,979 >> loading file merges.txt
[INFO|tokenization_utils_base.py:2209] 2025-02-14 22:41:51,979 >> loading file tokenizer.json
[INFO|tokenization_utils_base.py:2209] 2025-02-14 22:41:51,979 >> loading file added_tokens.json
[INFO|tokenization_utils_base.py:2209] 2025-02-14 22:41:51,979 >> loading file special_tokens_map.json
[INFO|tokenization_utils_base.py:2209] 2025-02-14 22:41:51,979 >> loading file tokenizer_config.json
[INFO|tokenization_utils_base.py:2475] 2025-02-14 22:41:52,226 >> Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
02/14/2025 22:41:52 - INFO - llmtuner.data.template - Replace eos token: <|im_end|>
[INFO|configuration_utils.py:677] 2025-02-14 22:41:52,228 >> loading configuration file E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4\config.json
[INFO|configuration_utils.py:746] 2025-02-14 22:41:52,230 >> Model config Qwen2Config {
"_name_or_path": "E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4",
"architectures": [
"Qwen2ForCausalLM"
],
"attention_dropout": 0.0,
"bos_token_id": 151643,
"eos_token_id": 151645,
"hidden_act": "silu",
"hidden_size": 3584,
"initializer_range": 0.02,
"intermediate_size": 18944,
"max_position_embeddings": 32768,
"max_window_layers": 28,
"model_type": "qwen2",
"num_attention_heads": 28,
"num_hidden_layers": 28,
"num_key_value_heads": 4,
"quantization_config": {
"batch_size": 1,
"bits": 4,
"block_name_to_quantize": null,
"cache_block_outputs": true,
"damp_percent": 0.01,
"dataset": null,
"desc_act": false,
"exllama_config": {
"version": 1
},
"group_size": 128,
"max_input_length": null,
"model_seqlen": null,
"module_name_preceding_first_block": null,
"modules_in_block_to_quantize": null,
"pad_token_id": null,
"quant_method": "gptq",
"sym": true,
"tokenizer": null,
"true_sequential": true,
"use_cuda_fp16": false,
"use_exllama": true
},
"rms_norm_eps": 1e-06,
"rope_scaling": null,
"rope_theta": 1000000.0,
"sliding_window": null,
"tie_word_embeddings": false,
"torch_dtype": "float16",
"transformers_version": "4.46.3",
"use_cache": true,
"use_sliding_window": false,
"vocab_size": 152064
}

02/14/2025 22:41:52 - INFO - llmtuner.model.utils.quantization - Loading 4-bit GPTQ-quantized model.
02/14/2025 22:41:52 - INFO - llmtuner.model.patcher - Using KV cache for faster generation.
CUDA extension not installed.
CUDA extension not installed.
exllama_kernels not installed.
Traceback (most recent call last):
File "E:\Muice-Chatbot\main.py", line 26, in
model = model_adapter.llm(model_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Muice-Chatbot\llm\llmtuner.py", line 17, in init
self.model = ChatModel(dict(
^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\chat\chat_model.py", line 26, in init
self.engine: "BaseEngine" = HuggingfaceEngine(model_args, data_args, finetuning_args, generating_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\chat\hf_engine.py", line 40, in init
self.model = load_model(
^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\model\loader.py", line 135, in load_model
model = AutoModelForCausalLM.from_pretrained(**init_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\transformers\models\auto\auto_factory.py", line 564, in from_pretrained
return model_class.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\transformers\modeling_utils.py", line 3652, in from_pretrained
hf_quantizer = AutoHfQuantizer.from_config(config.quantization_config, pre_quantized=pre_quantized)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\transformers\quantizers\auto.py", line 148, in from_config
return target_cls(quantization_config, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\transformers\quantizers\quantizer_gptq.py", line 47, in init
from optimum.gptq import GPTQQuantizer
File "C:\Users\123\miniconda3\Lib\site-packages\optimum\gptq_init_.py", line 15, in
from .quantizer import GPTQQuantizer, load_quantized_model
File "C:\Users\123\miniconda3\Lib\site-packages\optimum\gptq\quantizer.py", line 53, in
from auto_gptq import version as autogptq_version
File "C:\Users\123\miniconda3\Lib\site-packages\auto_gptq_init_.py", line 4, in
from .utils.peft_utils import get_gptq_peft_model
File "C:\Users\123\miniconda3\Lib\site-packages\auto_gptq\utils\peft_utils.py", line 20, in
from ..nn_modules.qlinear.qlinear_exllama import QuantLinear as QuantLinearExllama
File "C:\Users\123\miniconda3\Lib\site-packages\auto_gptq\nn_modules\qlinear\qlinear_exllama.py", line 14, in
from exllama_kernels import make_q4, q4_matmul
ImportError: DLL load failed while importing exllama_kernels: 找不到指定的程序。

@Moemu
Copy link
Owner

Moemu commented Feb 14, 2025

@v191949v
Copy link
Author

使用git clone https://github.com/PanQiWei/AutoGPTQ.git && cd AutoGPTQ命令时出现错误并提示无法访问https://github.com/PanQiWei/AutoGPTQ.git,是要梯子吗?
(原文:fatal: unable to access 'https://github.com/PanQiWei/AutoGPTQ.git/': SSL peer certificate or SSH remote key was not OK)

@Moemu
Copy link
Owner

Moemu commented Feb 14, 2025

网不行,直接下吧

@v191949v
Copy link
Author

下好了,但是我setup.py运行时会出问题,应该没下错吧...

Image

Image

@Moemu
Copy link
Owner

Moemu commented Feb 14, 2025

pip install -vvv --no-build-isolation -e .

@v191949v
Copy link
Author

这...是成功了还是没成功?

Image

@Moemu
Copy link
Owner

Moemu commented Feb 14, 2025

你漏了个点

@v191949v
Copy link
Author

额...抱歉...

@v191949v
Copy link
Author

好像又出错了...

Using pip 25.0 from C:\Users\123\miniconda3\Lib\site-packages\pip (python 3.11)
Non-user install because site-packages writeable
Created temporary directory: C:\Users\123\AppData\Local\Temp\pip-build-tracker-avu2ugp3
Initialized build tracking at C:\Users\123\AppData\Local\Temp\pip-build-tracker-avu2ugp3
Created build tracker: C:\Users\123\AppData\Local\Temp\pip-build-tracker-avu2ugp3
Entered build tracker: C:\Users\123\AppData\Local\Temp\pip-build-tracker-avu2ugp3
Created temporary directory: C:\Users\123\AppData\Local\Temp\pip-install-c3756g8x
Created temporary directory: C:\Users\123\AppData\Local\Temp\pip-ephem-wheel-cache-4cqni0h
Obtaining file:///C:/AutoGPTQ-0.7.1
Added file:///C:/AutoGPTQ-0.7.1 to build tracker 'C:\Users\123\AppData\Local\Temp\pip-build-tracker-avu2ugp3'
Running setup.py (path:C:\AutoGPTQ-0.7.1\setup.py) egg_info for package from file:///C:/AutoGPTQ-0.7.1
Created temporary directory: C:\Users\123\AppData\Local\Temp\pip-pip-egg-info-a8n54h6q
Running command python setup.py egg_info
conda_cuda_include_dir C:\Users\123\miniconda3\Lib\site-packages\nvidia/cuda_runtime/include
running egg_info
creating C:\Users\123\AppData\Local\Temp\pip-pip-egg-info-a8n54h6q\auto_gptq.egg-info
writing C:\Users\123\AppData\Local\Temp\pip-pip-egg-info-a8n54h6q\auto_gptq.egg-info\PKG-INFO
writing dependency_links to C:\Users\123\AppData\Local\Temp\pip-pip-egg-info-a8n54h6q\auto_gptq.egg-info\dependency_links.txt
writing requirements to C:\Users\123\AppData\Local\Temp\pip-pip-egg-info-a8n54h6q\auto_gptq.egg-info\requires.txt
writing top-level names to C:\Users\123\AppData\Local\Temp\pip-pip-egg-info-a8n54h6q\auto_gptq.egg-info\top_level.txt
writing manifest file 'C:\Users\123\AppData\Local\Temp\pip-pip-egg-info-a8n54h6q\auto_gptq.egg-info\SOURCES.txt'
C:\Users\123\miniconda3\Lib\site-packages\torch\utils\cpp_extension.py:529: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
reading manifest file 'C:\Users\123\AppData\Local\Temp\pip-pip-egg-info-a8n54h6q\auto_gptq.egg-info\SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'C:\Users\123\AppData\Local\Temp\pip-pip-egg-info-a8n54h6q\auto_gptq.egg-info\SOURCES.txt'
Preparing metadata (setup.py) ... done
Source in c:\autogptq-0.7.1 has version 0.7.1+cu124, which satisfies requirement auto_gptq==0.7.1+cu124 from file:///C:/AutoGPTQ-0.7.1
Removed auto_gptq==0.7.1+cu124 from file:///C:/AutoGPTQ-0.7.1 from build tracker 'C:\Users\123\AppData\Local\Temp\pip-build-tracker-avu2ugp3'
Requirement already satisfied: accelerate>=0.26.0 in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (1.3.0)
Requirement already satisfied: datasets in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (3.2.0)
Requirement already satisfied: sentencepiece in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (0.2.0)
Requirement already satisfied: numpy in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (1.26.4)
Requirement already satisfied: rouge in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (1.0.1)
Requirement already satisfied: gekko in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (1.2.1)
Requirement already satisfied: torch>=1.13.0 in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (2.6.0+cu124)
Requirement already satisfied: safetensors in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (0.5.2)
Requirement already satisfied: transformers>=4.31.0 in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (4.46.3)
Requirement already satisfied: peft>=0.5.0 in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (0.10.0)
Requirement already satisfied: tqdm in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (4.67.1)
Requirement already satisfied: packaging>=20.0 in c:\users\123\miniconda3\lib\site-packages (from accelerate>=0.26.0->auto_gptq==0.7.1+cu124) (24.2)
Requirement already satisfied: psutil in c:\users\123\miniconda3\lib\site-packages (from accelerate>=0.26.0->auto_gptq==0.7.1+cu124) (6.1.1)
Requirement already satisfied: pyyaml in c:\users\123\miniconda3\lib\site-packages (from accelerate>=0.26.0->auto_gptq==0.7.1+cu124) (6.0.2)
Requirement already satisfied: huggingface-hub>=0.21.0 in c:\users\123\miniconda3\lib\site-packages (from accelerate>=0.26.0->auto_gptq==0.7.1+cu124) (0.28.1)
Requirement already satisfied: filelock in c:\users\123\miniconda3\lib\site-packages (from torch>=1.13.0->auto_gptq==0.7.1+cu124) (3.17.0)
Requirement already satisfied: typing-extensions>=4.10.0 in c:\users\123\miniconda3\lib\site-packages (from torch>=1.13.0->auto_gptq==0.7.1+cu124) (4.12.2)
Requirement already satisfied: networkx in c:\users\123\miniconda3\lib\site-packages (from torch>=1.13.0->auto_gptq==0.7.1+cu124) (3.3)
Requirement already satisfied: jinja2 in c:\users\123\miniconda3\lib\site-packages (from torch>=1.13.0->auto_gptq==0.7.1+cu124) (3.1.4)
Requirement already satisfied: fsspec in c:\users\123\miniconda3\lib\site-packages (from torch>=1.13.0->auto_gptq==0.7.1+cu124) (2024.6.1)
Requirement already satisfied: sympy==1.13.1 in c:\users\123\miniconda3\lib\site-packages (from torch>=1.13.0->auto_gptq==0.7.1+cu124) (1.13.1)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in c:\users\123\miniconda3\lib\site-packages (from sympy==1.13.1->torch>=1.13.0->auto_gptq==0.7.1+cu124) (1.3.0)
Requirement already satisfied: regex!=2019.12.17 in c:\users\123\miniconda3\lib\site-packages (from transformers>=4.31.0->auto_gptq==0.7.1+cu124) (2024.11.6)
Requirement already satisfied: requests in c:\users\123\miniconda3\lib\site-packages (from transformers>=4.31.0->auto_gptq==0.7.1+cu124) (2.32.3)
Requirement already satisfied: tokenizers<0.21,>=0.20 in c:\users\123\miniconda3\lib\site-packages (from transformers>=4.31.0->auto_gptq==0.7.1+cu124) (0.20.3)
Requirement already satisfied: colorama in c:\users\123\miniconda3\lib\site-packages (from tqdm->auto_gptq==0.7.1+cu124) (0.4.6)
Requirement already satisfied: pyarrow>=15.0.0 in c:\users\123\miniconda3\lib\site-packages (from datasets->auto_gptq==0.7.1+cu124) (19.0.0)
Requirement already satisfied: dill<0.3.9,>=0.3.0 in c:\users\123\miniconda3\lib\site-packages (from datasets->auto_gptq==0.7.1+cu124) (0.3.8)
Requirement already satisfied: pandas in c:\users\123\miniconda3\lib\site-packages (from datasets->auto_gptq==0.7.1+cu124) (2.2.3)
Requirement already satisfied: xxhash in c:\users\123\miniconda3\lib\site-packages (from datasets->auto_gptq==0.7.1+cu124) (3.5.0)
Requirement already satisfied: multiprocess<0.70.17 in c:\users\123\miniconda3\lib\site-packages (from datasets->auto_gptq==0.7.1+cu124) (0.70.16)
Requirement already satisfied: aiohttp in c:\users\123\miniconda3\lib\site-packages (from datasets->auto_gptq==0.7.1+cu124) (3.11.12)
Requirement already satisfied: six in c:\users\123\miniconda3\lib\site-packages (from rouge->auto_gptq==0.7.1+cu124) (1.17.0)
Requirement already satisfied: aiohappyeyeballs>=2.3.0 in c:\users\123\miniconda3\lib\site-packages (from aiohttp->datasets->auto_gptq==0.7.1+cu124) (2.4.6)
Requirement already satisfied: aiosignal>=1.1.2 in c:\users\123\miniconda3\lib\site-packages (from aiohttp->datasets->auto_gptq==0.7.1+cu124) (1.3.2)
Requirement already satisfied: attrs>=17.3.0 in c:\users\123\miniconda3\lib\site-packages (from aiohttp->datasets->auto_gptq==0.7.1+cu124) (25.1.0)
Requirement already satisfied: frozenlist>=1.1.1 in c:\users\123\miniconda3\lib\site-packages (from aiohttp->datasets->auto_gptq==0.7.1+cu124) (1.5.0)
Requirement already satisfied: multidict<7.0,>=4.5 in c:\users\123\miniconda3\lib\site-packages (from aiohttp->datasets->auto_gptq==0.7.1+cu124) (6.1.0)
Requirement already satisfied: propcache>=0.2.0 in c:\users\123\miniconda3\lib\site-packages (from aiohttp->datasets->auto_gptq==0.7.1+cu124) (0.2.1)
Requirement already satisfied: yarl<2.0,>=1.17.0 in c:\users\123\miniconda3\lib\site-packages (from aiohttp->datasets->auto_gptq==0.7.1+cu124) (1.18.3)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\123\miniconda3\lib\site-packages (from requests->transformers>=4.31.0->auto_gptq==0.7.1+cu124) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in c:\users\123\miniconda3\lib\site-packages (from requests->transformers>=4.31.0->auto_gptq==0.7.1+cu124) (3.7)
Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\123\miniconda3\lib\site-packages (from requests->transformers>=4.31.0->auto_gptq==0.7.1+cu124) (2.3.0)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\123\miniconda3\lib\site-packages (from requests->transformers>=4.31.0->auto_gptq==0.7.1+cu124) (2025.1.31)
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\123\miniconda3\lib\site-packages (from jinja2->torch>=1.13.0->auto_gptq==0.7.1+cu124) (2.1.5)
Requirement already satisfied: python-dateutil>=2.8.2 in c:\users\123\miniconda3\lib\site-packages (from pandas->datasets->auto_gptq==0.7.1+cu124) (2.9.0.post0)
Requirement already satisfied: pytz>=2020.1 in c:\users\123\miniconda3\lib\site-packages (from pandas->datasets->auto_gptq==0.7.1+cu124) (2025.1)
Requirement already satisfied: tzdata>=2022.7 in c:\users\123\miniconda3\lib\site-packages (from pandas->datasets->auto_gptq==0.7.1+cu124) (2025.1)
Created temporary directory: C:\Users\123\AppData\Local\Temp\pip-unpack-h_ybb1mo
Installing collected packages: auto_gptq
Attempting uninstall: auto_gptq
Found existing installation: auto-gptq 0.5.0
Uninstalling auto-gptq-0.5.0:
Created temporary directory: C:\Users\123\miniconda3\Lib\site-packages~uto_gptq-0.5.0.dist-info
Removing file or directory c:\users\123\miniconda3\lib\site-packages\auto_gptq-0.5.0.dist-info
Created temporary directory: C:\Users\123\miniconda3\Lib\site-packages~uto_gptq
Removing file or directory c:\users\123\miniconda3\lib\site-packages\auto_gptq
Created temporary directory: C:\Users\123\AppData\Local\Temp\pip-uninstall-5xr4wdtc
Removing file or directory c:\users\123\miniconda3\lib\site-packages\autogptq_cuda_256.cp311-win_amd64.pyd
Removing file or directory c:\users\123\miniconda3\lib\site-packages\autogptq_cuda_64.cp311-win_amd64.pyd
Removing file or directory c:\users\123\miniconda3\lib\site-packages\exllama_kernels.cp311-win_amd64.pyd
Removing file or directory c:\users\123\miniconda3\lib\site-packages\exllamav2_kernels.cp311-win_amd64.pyd
Removing file or directory c:\users\123\miniconda3\lib\site-packages\tests_init
.py
Created temporary directory: C:\Users\123\miniconda3\Lib\site-packages\tests~pycache_
Removing file or directory c:\users\123\miniconda3\lib\site-packages\tests_pycache_
Removing file or directory c:\users\123\miniconda3\lib\site-packages\tests\test_peft_conversion.py
Removing file or directory c:\users\123\miniconda3\lib\site-packages\tests\test_q4.py
Successfully uninstalled auto-gptq-0.5.0
DEPRECATION: Legacy editable install of auto_gptq==0.7.1+cu124 from file:///C:/AutoGPTQ-0.7.1 (setup.py develop) is deprecated. pip 25.1 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at pypa/pip#11457
Running setup.py develop for auto_gptq
Running command python setup.py develop
conda_cuda_include_dir C:\Users\123\miniconda3\Lib\site-packages\nvidia/cuda_runtime/include
running develop
C:\Users\123\miniconda3\Lib\site-packages\setuptools\command\develop.py:41: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` and ``easy_install``.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  easy_install.initialize_options(self)
C:\Users\123\miniconda3\Lib\site-packages\setuptools\_distutils\cmd.py:79: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
running egg_info
creating auto_gptq.egg-info
writing auto_gptq.egg-info\PKG-INFO
writing dependency_links to auto_gptq.egg-info\dependency_links.txt
writing requirements to auto_gptq.egg-info\requires.txt
writing top-level names to auto_gptq.egg-info\top_level.txt
writing manifest file 'auto_gptq.egg-info\SOURCES.txt'
C:\Users\123\miniconda3\Lib\site-packages\torch\utils\cpp_extension.py:529: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
  warnings.warn(msg.format('we could not find ninja.'))
reading manifest file 'auto_gptq.egg-info\SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'auto_gptq.egg-info\SOURCES.txt'
running build_ext
C:\Users\123\miniconda3\Lib\site-packages\torch\utils\cpp_extension.py:414: UserWarning: Error checking compiler version for g++: [WinError 2] 系统找不到指定的文件。
  warnings.warn(f'Error checking compiler version for {compiler}: {error}')
C:\Users\123\miniconda3\Lib\site-packages\torch\utils\cpp_extension.py:448: UserWarning: The detected CUDA version (12.6) has a minor version mismatch with the version that was used to compile PyTorch (12.4). Most likely this shouldn't be a problem.
  warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
building 'autogptq_cuda_64' extension
creating build\temp.win-amd64-cpython-311\Release\autogptq_extension\cuda_64
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\123\miniconda3\Lib\site-packages\torch\include -IC:\Users\123\miniconda3\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\123\miniconda3\Lib\site-packages\torch\include\TH -IC:\Users\123\miniconda3\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\include" -Iautogptq_cuda -IC:\Users\123\miniconda3\include -IC:\Users\123\miniconda3\Include -IC:\Users\123\miniconda3\include -IC:\Users\123\miniconda3\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" /EHsc /Tpautogptq_extension/cuda_64/autogptq_cuda_64.cpp /Fobuild\temp.win-amd64-cpython-311\Release\autogptq_extension\cuda_64\autogptq_cuda_64.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /wd4624 /wd4067 /wd4068 /EHsc -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=autogptq_cuda_64 -D_GLIBCXX_USE_CXX11_ABI=0 /std:c++17
autogptq_cuda_64.cpp
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.40.33807\include\cstddef(11): fatal error C1083: 无法打开包括文件: “stddef.h”: No such file or directory
error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.40.33807\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
full command: 'C:\Users\123\miniconda3\python.exe' -c '
exec(compile('"'"''"'"''"'"'
# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
#
# - It imports setuptools before invoking setup.py, to enable projects that directly
#   import from `distutils.core` to work with newer packaging standards.
# - It provides a clear error message when setuptools is not installed.
# - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
#   setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
#     manifest_maker: standard file '"'"'-c'"'"' not found".
# - It generates a shim setup.py, for handling setup.cfg-only projects.
import os, sys, tokenize

try:
    import setuptools
except ImportError as error:
    print(
        "ERROR: Can not execute `setup.py` since setuptools is not available in "
        "the build environment.",
        file=sys.stderr,
    )
    sys.exit(1)

__file__ = %r
sys.argv[0] = __file__

if os.path.exists(__file__):
    filename = __file__
    with tokenize.open(__file__) as f:
        setup_py_code = f.read()
else:
    filename = "<auto-generated setuptools caller>"
    setup_py_code = "from setuptools import setup; setup()"

exec(compile(setup_py_code, filename, "exec"))
'"'"''"'"''"'"' % ('"'"'C:\\AutoGPTQ-0.7.1\\setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' develop --no-deps
cwd: C:\AutoGPTQ-0.7.1\\

Rolling back uninstall of auto-gptq
Moving to c:\users\123\miniconda3\lib\site-packages\auto_gptq-0.5.0.dist-info
from C:\Users\123\miniconda3\Lib\site-packages~uto_gptq-0.5.0.dist-info
Moving to c:\users\123\miniconda3\lib\site-packages\auto_gptq
from C:\Users\123\miniconda3\Lib\site-packages~uto_gptq
Moving to c:\users\123\miniconda3\lib\site-packages\autogptq_cuda_256.cp311-win_amd64.pyd
from C:\Users\123\AppData\Local\Temp\pip-uninstall-5xr4wdtc\autogptq_cuda_256.cp311-win_amd64.pyd
Moving to c:\users\123\miniconda3\lib\site-packages\autogptq_cuda_64.cp311-win_amd64.pyd
from C:\Users\123\AppData\Local\Temp\pip-uninstall-5xr4wdtc\autogptq_cuda_64.cp311-win_amd64.pyd
Moving to c:\users\123\miniconda3\lib\site-packages\exllama_kernels.cp311-win_amd64.pyd
from C:\Users\123\AppData\Local\Temp\pip-uninstall-5xr4wdtc\exllama_kernels.cp311-win_amd64.pyd
Moving to c:\users\123\miniconda3\lib\site-packages\exllamav2_kernels.cp311-win_amd64.pyd
from C:\Users\123\AppData\Local\Temp\pip-uninstall-5xr4wdtc\exllamav2_kernels.cp311-win_amd64.pyd
Moving to c:\users\123\miniconda3\lib\site-packages\tests_init_.py
from C:\Users\123\AppData\Local\Temp\pip-uninstall-5xr4wdtc\tests_init_.py
Moving to c:\users\123\miniconda3\lib\site-packages\tests_pycache_
from C:\Users\123\miniconda3\Lib\site-packages\tests~pycache_
Moving to c:\users\123\miniconda3\lib\site-packages\tests\test_peft_conversion.py
from C:\Users\123\AppData\Local\Temp\pip-uninstall-5xr4wdtc\tests\test_peft_conversion.py
Moving to c:\users\123\miniconda3\lib\site-packages\tests\test_q4.py
from C:\Users\123\AppData\Local\Temp\pip-uninstall-5xr4wdtc\tests\test_q4.py
Replacing c:\users\123\miniconda3\lib\site-packages\auto_gptq-0.5.0.dist-info\ from C:\Users\123\miniconda3\Lib\site-packages~uto_gptq-0.5.0.dist-info
Replacing c:\users\123\miniconda3\lib\site-packages\auto_gptq\ from C:\Users\123\miniconda3\Lib\site-packages~uto_gptq
Replacing c:\users\123\miniconda3\lib\site-packages\autogptq_cuda_256.cp311-win_amd64.pyd from C:\Users\123\AppData\Local\Temp\pip-uninstall-5xr4wdtc\autogptq_cuda_256.cp311-win_amd64.pyd
Replacing c:\users\123\miniconda3\lib\site-packages\autogptq_cuda_64.cp311-win_amd64.pyd from C:\Users\123\AppData\Local\Temp\pip-uninstall-5xr4wdtc\autogptq_cuda_64.cp311-win_amd64.pyd
Replacing c:\users\123\miniconda3\lib\site-packages\exllama_kernels.cp311-win_amd64.pyd from C:\Users\123\AppData\Local\Temp\pip-uninstall-5xr4wdtc\exllama_kernels.cp311-win_amd64.pyd
Replacing c:\users\123\miniconda3\lib\site-packages\exllamav2_kernels.cp311-win_amd64.pyd from C:\Users\123\AppData\Local\Temp\pip-uninstall-5xr4wdtc\exllamav2_kernels.cp311-win_amd64.pyd
Replacing c:\users\123\miniconda3\lib\site-packages\tests_init_.py from C:\Users\123\AppData\Local\Temp\pip-uninstall-5xr4wdtc\tests_init_.py
Replacing c:\users\123\miniconda3\lib\site-packages\tests_pycache_\ from C:\Users\123\miniconda3\Lib\site-packages\tests~pycache_
Replacing c:\users\123\miniconda3\lib\site-packages\tests\test_peft_conversion.py from C:\Users\123\AppData\Local\Temp\pip-uninstall-5xr4wdtc\tests\test_peft_conversion.py
Replacing c:\users\123\miniconda3\lib\site-packages\tests\test_q4.py from C:\Users\123\AppData\Local\Temp\pip-uninstall-5xr4wdtc\tests\test_q4.py
Remote version of pip: 25.0.1
Local version of pip: 25.0
Was pip installed by pip? False
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
Exception information:
Traceback (most recent call last):
File "C:\Users\123\miniconda3\Lib\site-packages\pip_internal\cli\base_command.py", line 106, in _run_wrapper
status = _inner_run()
^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\pip_internal\cli\base_command.py", line 97, in inner_run
return self.run(options, args)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\pip_internal\cli\req_command.py", line 67, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\pip_internal\commands\install.py", line 458, in run
installed = install_given_reqs(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\pip_internal\req_init
.py", line 70, in install_given_reqs
requirement.install(
File "C:\Users\123\miniconda3\Lib\site-packages\pip_internal\req\req_install.py", line 850, in install
install_editable_legacy(
File "C:\Users\123\miniconda3\Lib\site-packages\pip_internal\operations\install\editable_legacy.py", line 43, in install_editable
call_subprocess(
File "C:\Users\123\miniconda3\Lib\site-packages\pip_internal\utils\subprocess.py", line 209, in call_subprocess
raise error
pip._internal.exceptions.InstallationSubprocessError: python setup.py develop exited with 1
Removed build tracker: 'C:\Users\123\AppData\Local\Temp\pip-build-tracker-avu2ugp3'

@Moemu

This comment has been minimized.

@Moemu
Copy link
Owner

Moemu commented Feb 14, 2025

或者你如果有这个终端就用这个终端编译:

Image

@v191949v
Copy link
Author

终端编译用了一下,结果还是出现一样的错误,至于那个blog上的教程...感觉我的页面和他的对不上

Image

Image

@Moemu
Copy link
Owner

Moemu commented Feb 14, 2025

https://github.com/Moemu/Muice-Chatbot/blob/main/docs/faq.md#error-microsoft-visual-c-140-or-greater-is-required

重新配置编译环境,在这的基础上勾选 Windows 11 SDK (单个组件 -> SDK、库和框架)

Image

@v191949v
Copy link
Author

配置环境变量后仍然出错,是我的配置方法出了问题么...

Image

以及...还有一些不对版的东西

Image

Image

@Moemu
Copy link
Owner

Moemu commented Feb 14, 2025

重启系统

@v191949v
Copy link
Author

重启了一遍电脑,还出现这个...

C:\AutoGPTQ-0.7.1>pip install -vvv --no-build-isolation -e .
Using pip 25.0 from C:\Users\123\miniconda3\Lib\site-packages\pip (python 3.11)
Non-user install because site-packages writeable
Created temporary directory: C:\Users\123\AppData\Local\Temp\pip-build-tracker-09exf4ay
Initialized build tracking at C:\Users\123\AppData\Local\Temp\pip-build-tracker-09exf4ay
Created build tracker: C:\Users\123\AppData\Local\Temp\pip-build-tracker-09exf4ay
Entered build tracker: C:\Users\123\AppData\Local\Temp\pip-build-tracker-09exf4ay
Created temporary directory: C:\Users\123\AppData\Local\Temp\pip-install-3o8lypn8
Created temporary directory: C:\Users\123\AppData\Local\Temp\pip-ephem-wheel-cache-ros16r99
Obtaining file:///C:/AutoGPTQ-0.7.1
Added file:///C:/AutoGPTQ-0.7.1 to build tracker 'C:\Users\123\AppData\Local\Temp\pip-build-tracker-09exf4ay'
Running setup.py (path:C:\AutoGPTQ-0.7.1\setup.py) egg_info for package from file:///C:/AutoGPTQ-0.7.1
Created temporary directory: C:\Users\123\AppData\Local\Temp\pip-pip-egg-info-har50ile
Running command python setup.py egg_info
conda_cuda_include_dir C:\Users\123\miniconda3\Lib\site-packages\nvidia/cuda_runtime/include
running egg_info
creating C:\Users\123\AppData\Local\Temp\pip-pip-egg-info-har50ile\auto_gptq.egg-info
writing C:\Users\123\AppData\Local\Temp\pip-pip-egg-info-har50ile\auto_gptq.egg-info\PKG-INFO
writing dependency_links to C:\Users\123\AppData\Local\Temp\pip-pip-egg-info-har50ile\auto_gptq.egg-info\dependency_links.txt
writing requirements to C:\Users\123\AppData\Local\Temp\pip-pip-egg-info-har50ile\auto_gptq.egg-info\requires.txt
writing top-level names to C:\Users\123\AppData\Local\Temp\pip-pip-egg-info-har50ile\auto_gptq.egg-info\top_level.txt
writing manifest file 'C:\Users\123\AppData\Local\Temp\pip-pip-egg-info-har50ile\auto_gptq.egg-info\SOURCES.txt'
C:\Users\123\miniconda3\Lib\site-packages\torch\utils\cpp_extension.py:529: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
warnings.warn(msg.format('we could not find ninja.'))
reading manifest file 'C:\Users\123\AppData\Local\Temp\pip-pip-egg-info-har50ile\auto_gptq.egg-info\SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'C:\Users\123\AppData\Local\Temp\pip-pip-egg-info-har50ile\auto_gptq.egg-info\SOURCES.txt'
Preparing metadata (setup.py) ... done
Source in c:\autogptq-0.7.1 has version 0.7.1+cu124, which satisfies requirement auto_gptq==0.7.1+cu124 from file:///C:/AutoGPTQ-0.7.1
Removed auto_gptq==0.7.1+cu124 from file:///C:/AutoGPTQ-0.7.1 from build tracker 'C:\Users\123\AppData\Local\Temp\pip-build-tracker-09exf4ay'
Requirement already satisfied: accelerate>=0.26.0 in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (1.3.0)
Requirement already satisfied: datasets in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (3.2.0)
Requirement already satisfied: sentencepiece in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (0.2.0)
Requirement already satisfied: numpy in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (1.26.4)
Requirement already satisfied: rouge in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (1.0.1)
Requirement already satisfied: gekko in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (1.2.1)
Requirement already satisfied: torch>=1.13.0 in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (2.6.0+cu124)
Requirement already satisfied: safetensors in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (0.5.2)
Requirement already satisfied: transformers>=4.31.0 in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (4.46.3)
Requirement already satisfied: peft>=0.5.0 in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (0.10.0)
Requirement already satisfied: tqdm in c:\users\123\miniconda3\lib\site-packages (from auto_gptq==0.7.1+cu124) (4.67.1)
Requirement already satisfied: packaging>=20.0 in c:\users\123\miniconda3\lib\site-packages (from accelerate>=0.26.0->auto_gptq==0.7.1+cu124) (24.2)
Requirement already satisfied: psutil in c:\users\123\miniconda3\lib\site-packages (from accelerate>=0.26.0->auto_gptq==0.7.1+cu124) (6.1.1)
Requirement already satisfied: pyyaml in c:\users\123\miniconda3\lib\site-packages (from accelerate>=0.26.0->auto_gptq==0.7.1+cu124) (6.0.2)
Requirement already satisfied: huggingface-hub>=0.21.0 in c:\users\123\miniconda3\lib\site-packages (from accelerate>=0.26.0->auto_gptq==0.7.1+cu124) (0.28.1)
Requirement already satisfied: filelock in c:\users\123\miniconda3\lib\site-packages (from torch>=1.13.0->auto_gptq==0.7.1+cu124) (3.17.0)
Requirement already satisfied: typing-extensions>=4.10.0 in c:\users\123\miniconda3\lib\site-packages (from torch>=1.13.0->auto_gptq==0.7.1+cu124) (4.12.2)
Requirement already satisfied: networkx in c:\users\123\miniconda3\lib\site-packages (from torch>=1.13.0->auto_gptq==0.7.1+cu124) (3.3)
Requirement already satisfied: jinja2 in c:\users\123\miniconda3\lib\site-packages (from torch>=1.13.0->auto_gptq==0.7.1+cu124) (3.1.4)
Requirement already satisfied: fsspec in c:\users\123\miniconda3\lib\site-packages (from torch>=1.13.0->auto_gptq==0.7.1+cu124) (2024.6.1)
Requirement already satisfied: sympy==1.13.1 in c:\users\123\miniconda3\lib\site-packages (from torch>=1.13.0->auto_gptq==0.7.1+cu124) (1.13.1)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in c:\users\123\miniconda3\lib\site-packages (from sympy==1.13.1->torch>=1.13.0->auto_gptq==0.7.1+cu124) (1.3.0)
Requirement already satisfied: regex!=2019.12.17 in c:\users\123\miniconda3\lib\site-packages (from transformers>=4.31.0->auto_gptq==0.7.1+cu124) (2024.11.6)
Requirement already satisfied: requests in c:\users\123\miniconda3\lib\site-packages (from transformers>=4.31.0->auto_gptq==0.7.1+cu124) (2.32.3)
Requirement already satisfied: tokenizers<0.21,>=0.20 in c:\users\123\miniconda3\lib\site-packages (from transformers>=4.31.0->auto_gptq==0.7.1+cu124) (0.20.3)
Requirement already satisfied: colorama in c:\users\123\miniconda3\lib\site-packages (from tqdm->auto_gptq==0.7.1+cu124) (0.4.6)
Requirement already satisfied: pyarrow>=15.0.0 in c:\users\123\miniconda3\lib\site-packages (from datasets->auto_gptq==0.7.1+cu124) (19.0.0)
Requirement already satisfied: dill<0.3.9,>=0.3.0 in c:\users\123\miniconda3\lib\site-packages (from datasets->auto_gptq==0.7.1+cu124) (0.3.8)
Requirement already satisfied: pandas in c:\users\123\miniconda3\lib\site-packages (from datasets->auto_gptq==0.7.1+cu124) (2.2.3)
Requirement already satisfied: xxhash in c:\users\123\miniconda3\lib\site-packages (from datasets->auto_gptq==0.7.1+cu124) (3.5.0)
Requirement already satisfied: multiprocess<0.70.17 in c:\users\123\miniconda3\lib\site-packages (from datasets->auto_gptq==0.7.1+cu124) (0.70.16)
Requirement already satisfied: aiohttp in c:\users\123\miniconda3\lib\site-packages (from datasets->auto_gptq==0.7.1+cu124) (3.11.12)
Requirement already satisfied: six in c:\users\123\miniconda3\lib\site-packages (from rouge->auto_gptq==0.7.1+cu124) (1.17.0)
Requirement already satisfied: aiohappyeyeballs>=2.3.0 in c:\users\123\miniconda3\lib\site-packages (from aiohttp->datasets->auto_gptq==0.7.1+cu124) (2.4.6)
Requirement already satisfied: aiosignal>=1.1.2 in c:\users\123\miniconda3\lib\site-packages (from aiohttp->datasets->auto_gptq==0.7.1+cu124) (1.3.2)
Requirement already satisfied: attrs>=17.3.0 in c:\users\123\miniconda3\lib\site-packages (from aiohttp->datasets->auto_gptq==0.7.1+cu124) (25.1.0)
Requirement already satisfied: frozenlist>=1.1.1 in c:\users\123\miniconda3\lib\site-packages (from aiohttp->datasets->auto_gptq==0.7.1+cu124) (1.5.0)
Requirement already satisfied: multidict<7.0,>=4.5 in c:\users\123\miniconda3\lib\site-packages (from aiohttp->datasets->auto_gptq==0.7.1+cu124) (6.1.0)
Requirement already satisfied: propcache>=0.2.0 in c:\users\123\miniconda3\lib\site-packages (from aiohttp->datasets->auto_gptq==0.7.1+cu124) (0.2.1)
Requirement already satisfied: yarl<2.0,>=1.17.0 in c:\users\123\miniconda3\lib\site-packages (from aiohttp->datasets->auto_gptq==0.7.1+cu124) (1.18.3)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\123\miniconda3\lib\site-packages (from requests->transformers>=4.31.0->auto_gptq==0.7.1+cu124) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in c:\users\123\miniconda3\lib\site-packages (from requests->transformers>=4.31.0->auto_gptq==0.7.1+cu124) (3.7)
Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\123\miniconda3\lib\site-packages (from requests->transformers>=4.31.0->auto_gptq==0.7.1+cu124) (2.3.0)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\123\miniconda3\lib\site-packages (from requests->transformers>=4.31.0->auto_gptq==0.7.1+cu124) (2025.1.31)
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\123\miniconda3\lib\site-packages (from jinja2->torch>=1.13.0->auto_gptq==0.7.1+cu124) (2.1.5)
Requirement already satisfied: python-dateutil>=2.8.2 in c:\users\123\miniconda3\lib\site-packages (from pandas->datasets->auto_gptq==0.7.1+cu124) (2.9.0.post0)
Requirement already satisfied: pytz>=2020.1 in c:\users\123\miniconda3\lib\site-packages (from pandas->datasets->auto_gptq==0.7.1+cu124) (2025.1)
Requirement already satisfied: tzdata>=2022.7 in c:\users\123\miniconda3\lib\site-packages (from pandas->datasets->auto_gptq==0.7.1+cu124) (2025.1)
Created temporary directory: C:\Users\123\AppData\Local\Temp\pip-unpack-ihg4ocem
Installing collected packages: auto_gptq
Attempting uninstall: auto_gptq
Found existing installation: auto-gptq 0.5.0
Uninstalling auto-gptq-0.5.0:
Created temporary directory: C:\Users\123\miniconda3\Lib\site-packages~uto_gptq-0.5.0.dist-info
Removing file or directory c:\users\123\miniconda3\lib\site-packages\auto_gptq-0.5.0.dist-info
Created temporary directory: C:\Users\123\miniconda3\Lib\site-packages~uto_gptq
Removing file or directory c:\users\123\miniconda3\lib\site-packages\auto_gptq
Created temporary directory: C:\Users\123\AppData\Local\Temp\pip-uninstall-whchcau4
Removing file or directory c:\users\123\miniconda3\lib\site-packages\autogptq_cuda_256.cp311-win_amd64.pyd
Removing file or directory c:\users\123\miniconda3\lib\site-packages\autogptq_cuda_64.cp311-win_amd64.pyd
Removing file or directory c:\users\123\miniconda3\lib\site-packages\exllama_kernels.cp311-win_amd64.pyd
Removing file or directory c:\users\123\miniconda3\lib\site-packages\exllamav2_kernels.cp311-win_amd64.pyd
Removing file or directory c:\users\123\miniconda3\lib\site-packages\tests_init_.py
Created temporary directory: C:\Users\123\miniconda3\Lib\site-packages\tests~pycache_
Removing file or directory c:\users\123\miniconda3\lib\site-packages\tests_pycache_
Removing file or directory c:\users\123\miniconda3\lib\site-packages\tests\test_peft_conversion.py
Removing file or directory c:\users\123\miniconda3\lib\site-packages\tests\test_q4.py
Successfully uninstalled auto-gptq-0.5.0
DEPRECATION: Legacy editable install of auto_gptq==0.7.1+cu124 from file:///C:/AutoGPTQ-0.7.1 (setup.py develop) is deprecated. pip 25.1 will enforce this behaviour change. A possible replacement is to add a pyproject.toml or enable --use-pep517, and use setuptools >= 64. If the resulting installation is not behaving as expected, try using --config-settings editable_mode=compat. Please consult the setuptools documentation for more information. Discussion can be found at pypa/pip#11457
Running setup.py develop for auto_gptq
Running command python setup.py develop
conda_cuda_include_dir C:\Users\123\miniconda3\Lib\site-packages\nvidia/cuda_runtime/include
running develop
C:\Users\123\miniconda3\Lib\site-packages\setuptools\command\develop.py:41: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` and ``easy_install``.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://github.com/pypa/setuptools/issues/917 for details.
        ********************************************************************************

!!
  easy_install.initialize_options(self)
C:\Users\123\miniconda3\Lib\site-packages\setuptools\_distutils\cmd.py:79: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!

        ********************************************************************************
        Please avoid running ``setup.py`` directly.
        Instead, use pypa/build, pypa/installer or other
        standards-based tools.

        See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
        ********************************************************************************

!!
  self.initialize_options()
running egg_info
writing auto_gptq.egg-info\PKG-INFO
writing dependency_links to auto_gptq.egg-info\dependency_links.txt
writing requirements to auto_gptq.egg-info\requires.txt
writing top-level names to auto_gptq.egg-info\top_level.txt
C:\Users\123\miniconda3\Lib\site-packages\torch\utils\cpp_extension.py:529: UserWarning: Attempted to use ninja as the BuildExtension backend but we could not find ninja.. Falling back to using the slow distutils backend.
  warnings.warn(msg.format('we could not find ninja.'))
reading manifest file 'auto_gptq.egg-info\SOURCES.txt'
adding license file 'LICENSE'
writing manifest file 'auto_gptq.egg-info\SOURCES.txt'
running build_ext
C:\Users\123\miniconda3\Lib\site-packages\torch\utils\cpp_extension.py:414: UserWarning: Error checking compiler version for g++: [WinError 2] 系统找不到指定的文件。
  warnings.warn(f'Error checking compiler version for {compiler}: {error}')
C:\Users\123\miniconda3\Lib\site-packages\torch\utils\cpp_extension.py:448: UserWarning: The detected CUDA version (12.6) has a minor version mismatch with the version that was used to compile PyTorch (12.4). Most likely this shouldn't be a problem.
  warnings.warn(CUDA_MISMATCH_WARN.format(cuda_str_version, torch.version.cuda))
building 'autogptq_cuda_64' extension
"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\Users\123\miniconda3\Lib\site-packages\torch\include -IC:\Users\123\miniconda3\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\123\miniconda3\Lib\site-packages\torch\include\TH -IC:\Users\123\miniconda3\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\include" -Iautogptq_cuda -IC:\Users\123\miniconda3\include -IC:\Users\123\miniconda3\Include -IC:\Users\123\miniconda3\include -IC:\Users\123\miniconda3\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um" /EHsc /Tpautogptq_extension/cuda_64/autogptq_cuda_64.cpp /Fobuild\temp.win-amd64-cpython-311\Release\autogptq_extension\cuda_64\autogptq_cuda_64.obj /MD /wd4819 /wd4251 /wd4244 /wd4267 /wd4275 /wd4018 /wd4190 /wd4624 /wd4067 /wd4068 /EHsc -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=autogptq_cuda_64 -D_GLIBCXX_USE_CXX11_ABI=0 /std:c++17
autogptq_cuda_64.cpp
C:\Users\123\miniconda3\Lib\site-packages\torch\utils\cpp_extension.py:2059: UserWarning: TORCH_CUDA_ARCH_LIST is not set, all archs for visible cards are included for compilation.
If this is not desired, please set os.environ['TORCH_CUDA_ARCH_LIST'].
  warnings.warn(
"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\bin\nvcc" -c autogptq_extension/cuda_64/autogptq_cuda_kernel_64.cu -o build\temp.win-amd64-cpython-311\Release\autogptq_extension\cuda_64\autogptq_cuda_kernel_64.obj -IC:\Users\123\miniconda3\Lib\site-packages\torch\include -IC:\Users\123\miniconda3\Lib\site-packages\torch\include\torch\csrc\api\include -IC:\Users\123\miniconda3\Lib\site-packages\torch\include\TH -IC:\Users\123\miniconda3\Lib\site-packages\torch\include\THC "-IC:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.6\include" -Iautogptq_cuda -IC:\Users\123\miniconda3\include -IC:\Users\123\miniconda3\Include -IC:\Users\123\miniconda3\include -IC:\Users\123\miniconda3\Include "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.43.34808\include" "-IC:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22621.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt" "-IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt" "-IC:\Program Files (x86)\Windows Kits\10\Lib\10.0.22621.0\um" -Xcudafe --diag_suppress=dll_interface_conflict_dllexport_assumed -Xcudafe --diag_suppress=dll_interface_conflict_none_assumed -Xcudafe --diag_suppress=field_without_dll_interface -Xcudafe --diag_suppress=base_class_has_different_dll_interface -Xcompiler /EHsc -Xcompiler /wd4068 -Xcompiler /wd4067 -Xcompiler /wd4624 -Xcompiler /wd4190 -Xcompiler /wd4018 -Xcompiler /wd4275 -Xcompiler /wd4267 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4819 -Xcompiler /MD -D__CUDA_NO_HALF_OPERATORS__ -D__CUDA_NO_HALF_CONVERSIONS__ -D__CUDA_NO_BFLOAT16_CONVERSIONS__ -D__CUDA_NO_HALF2_OPERATORS__ --expt-relaxed-constexpr -DTORCH_API_INCLUDE_EXTENSION_H -DTORCH_EXTENSION_NAME=autogptq_cuda_64 -D_GLIBCXX_USE_CXX11_ABI=0 -gencode=arch=compute_75,code=compute_75 -gencode=arch=compute_75,code=sm_75 -std=c++17 --use-local-env
C:\AutoGPTQ-0.7.1\autogptq_extension\cuda_64\autogptq_cuda_kernel_64.cu(270): error: no suitable conversion function from "const at::DeprecatedTypeProperties" to "c10::ScalarType" exists
    [&] { const auto& the_type = vec.type(); constexpr const char* at_dispatch_name = "vecquant2matmul_cuda"; at::ScalarType _st = ::detail::scalar_type(the_type); ; switch (_st) { case at::ScalarType::Double: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Double)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(278), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)","dtype '", toString(at::ScalarType::Double), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Double>; return ([&] { VecQuant2MatMulKernel<<<blocks, threads>>>( vec.data<scalar_t>(), mat.data<int>(), mul.data<scalar_t>(), scales.data<scalar_t>(), zeros.data<int>(), g_idx.data<int>(), batch, vec_height, height, width, zero_width ); })(); } case at::ScalarType::Float: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Float)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(278), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)","dtype '", toString(at::ScalarType::Float), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Float>; return ([&] { VecQuant2MatMulKernel<<<blocks, threads>>>( vec.data<scalar_t>(), mat.data<int>(), mul.data<scalar_t>(), scales.data<scalar_t>(), zeros.data<int>(), g_idx.data<int>(), batch, vec_height, height, width, zero_width ); })(); } default: if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(278), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)",'"', at_dispatch_name, "\" not implemented for '", toString(_st), "'"))); }; } }();

                                 ^

C:\AutoGPTQ-0.7.1\autogptq_extension\cuda_64\autogptq_cuda_kernel_64.cu(359): error: no suitable conversion function from "const at::DeprecatedTypeProperties" to "c10::ScalarType" exists
    [&] { const auto& the_type = vec.type(); constexpr const char* at_dispatch_name = "vecquant3matmul_cuda"; at::ScalarType _st = ::detail::scalar_type(the_type); ; switch (_st) { case at::ScalarType::Double: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Double)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(367), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)","dtype '", toString(at::ScalarType::Double), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Double>; return ([&] { VecQuant3MatMulKernel<<<blocks, threads>>>( vec.data<scalar_t>(), mat.data<int>(), mul.data<scalar_t>(), scales.data<scalar_t>(), zeros.data<int>(), g_idx.data<int>(), batch, vec_height, height, width, zero_width ); })(); } case at::ScalarType::Float: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Float)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(367), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)","dtype '", toString(at::ScalarType::Float), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Float>; return ([&] { VecQuant3MatMulKernel<<<blocks, threads>>>( vec.data<scalar_t>(), mat.data<int>(), mul.data<scalar_t>(), scales.data<scalar_t>(), zeros.data<int>(), g_idx.data<int>(), batch, vec_height, height, width, zero_width ); })(); } default: if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(367), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)",'"', at_dispatch_name, "\" not implemented for '", toString(_st), "'"))); }; } }();

                                 ^

C:\AutoGPTQ-0.7.1\autogptq_extension\cuda_64\autogptq_cuda_kernel_64.cu(504): error: no suitable conversion function from "const at::DeprecatedTypeProperties" to "c10::ScalarType" exists
    [&] { const auto& the_type = vec.type(); constexpr const char* at_dispatch_name = "vecquant4matmul_cuda"; at::ScalarType _st = ::detail::scalar_type(the_type); ; switch (_st) { case at::ScalarType::Double: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Double)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(512), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)","dtype '", toString(at::ScalarType::Double), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Double>; return ([&] { VecQuant4MatMulKernel<<<blocks, threads>>>( vec.data<scalar_t>(), mat.data<int>(), mul.data<scalar_t>(), scales.data<scalar_t>(), zeros.data<int>(), g_idx.data<int>(), batch, vec_height, height, width, zero_width ); })(); } case at::ScalarType::Float: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Float)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(512), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)","dtype '", toString(at::ScalarType::Float), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Float>; return ([&] { VecQuant4MatMulKernel<<<blocks, threads>>>( vec.data<scalar_t>(), mat.data<int>(), mul.data<scalar_t>(), scales.data<scalar_t>(), zeros.data<int>(), g_idx.data<int>(), batch, vec_height, height, width, zero_width ); })(); } default: if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(512), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)",'"', at_dispatch_name, "\" not implemented for '", toString(_st), "'"))); }; } }();

                                 ^

C:\AutoGPTQ-0.7.1\autogptq_extension\cuda_64\autogptq_cuda_kernel_64.cu(592): error: no suitable conversion function from "const at::DeprecatedTypeProperties" to "c10::ScalarType" exists
    [&] { const auto& the_type = vec.type(); constexpr const char* at_dispatch_name = "vecquant8matmul_cuda"; at::ScalarType _st = ::detail::scalar_type(the_type); ; switch (_st) { case at::ScalarType::Double: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Double)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(600), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)","dtype '", toString(at::ScalarType::Double), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Double>; return ([&] { VecQuant8MatMulKernel<<<blocks, threads>>>( vec.data<scalar_t>(), mat.data<int>(), mul.data<scalar_t>(), scales.data<scalar_t>(), zeros.data<int>(), g_idx.data<int>(), batch, vec_height, height, width, zero_width ); })(); } case at::ScalarType::Float: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Float)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(600), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)","dtype '", toString(at::ScalarType::Float), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Float>; return ([&] { VecQuant8MatMulKernel<<<blocks, threads>>>( vec.data<scalar_t>(), mat.data<int>(), mul.data<scalar_t>(), scales.data<scalar_t>(), zeros.data<int>(), g_idx.data<int>(), batch, vec_height, height, width, zero_width ); })(); } default: if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(600), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)",'"', at_dispatch_name, "\" not implemented for '", toString(_st), "'"))); }; } }();

                                 ^

C:\AutoGPTQ-0.7.1\autogptq_extension\cuda_64\autogptq_cuda_kernel_64.cu(681): error: no suitable conversion function from "const at::DeprecatedTypeProperties" to "c10::ScalarType" exists
    [&] { const auto& the_type = vec.type(); constexpr const char* at_dispatch_name = "vecquant2matmul_cuda_old"; at::ScalarType _st = ::detail::scalar_type(the_type); ; switch (_st) { case at::ScalarType::Double: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Double)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(689), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)","dtype '", toString(at::ScalarType::Double), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Double>; return ([&] { VecQuant2MatMulKernel_old<<<blocks, threads>>>( vec.data<scalar_t>(), mat.data<int>(), mul.data<scalar_t>(), scales.data<scalar_t>(), zeros.data<int>(), batch, vec_height, height, width, zero_width, groupsize ); })(); } case at::ScalarType::Float: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Float)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(689), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)","dtype '", toString(at::ScalarType::Float), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Float>; return ([&] { VecQuant2MatMulKernel_old<<<blocks, threads>>>( vec.data<scalar_t>(), mat.data<int>(), mul.data<scalar_t>(), scales.data<scalar_t>(), zeros.data<int>(), batch, vec_height, height, width, zero_width, groupsize ); })(); } default: if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(689), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)",'"', at_dispatch_name, "\" not implemented for '", toString(_st), "'"))); }; } }();

                                     ^

C:\AutoGPTQ-0.7.1\autogptq_extension\cuda_64\autogptq_cuda_kernel_64.cu(776): error: no suitable conversion function from "const at::DeprecatedTypeProperties" to "c10::ScalarType" exists
    [&] { const auto& the_type = vec.type(); constexpr const char* at_dispatch_name = "vecquant3matmul_cuda_old"; at::ScalarType _st = ::detail::scalar_type(the_type); ; switch (_st) { case at::ScalarType::Double: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Double)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(784), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)","dtype '", toString(at::ScalarType::Double), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Double>; return ([&] { VecQuant3MatMulKernel_old<<<blocks, threads>>>( vec.data<scalar_t>(), mat.data<int>(), mul.data<scalar_t>(), scales.data<scalar_t>(), zeros.data<int>(), batch, vec_height, height, width, zero_width, groupsize ); })(); } case at::ScalarType::Float: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Float)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(784), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)","dtype '", toString(at::ScalarType::Float), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Float>; return ([&] { VecQuant3MatMulKernel_old<<<blocks, threads>>>( vec.data<scalar_t>(), mat.data<int>(), mul.data<scalar_t>(), scales.data<scalar_t>(), zeros.data<int>(), batch, vec_height, height, width, zero_width, groupsize ); })(); } default: if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(784), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)",'"', at_dispatch_name, "\" not implemented for '", toString(_st), "'"))); }; } }();

                                     ^

C:\AutoGPTQ-0.7.1\autogptq_extension\cuda_64\autogptq_cuda_kernel_64.cu(935): error: no suitable conversion function from "const at::DeprecatedTypeProperties" to "c10::ScalarType" exists
    [&] { const auto& the_type = vec.type(); constexpr const char* at_dispatch_name = "vecquant4matmul_cuda_old"; at::ScalarType _st = ::detail::scalar_type(the_type); ; switch (_st) { case at::ScalarType::Double: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Double)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(943), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)","dtype '", toString(at::ScalarType::Double), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Double>; return ([&] { VecQuant4MatMulKernel_old<<<blocks, threads>>>( vec.data<scalar_t>(), mat.data<int>(), mul.data<scalar_t>(), scales.data<scalar_t>(), zeros.data<int>(), batch, vec_height, height, width, zero_width, groupsize ); })(); } case at::ScalarType::Float: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Float)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(943), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)","dtype '", toString(at::ScalarType::Float), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Float>; return ([&] { VecQuant4MatMulKernel_old<<<blocks, threads>>>( vec.data<scalar_t>(), mat.data<int>(), mul.data<scalar_t>(), scales.data<scalar_t>(), zeros.data<int>(), batch, vec_height, height, width, zero_width, groupsize ); })(); } default: if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(943), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)",'"', at_dispatch_name, "\" not implemented for '", toString(_st), "'"))); }; } }();

                                     ^

C:\AutoGPTQ-0.7.1\autogptq_extension\cuda_64\autogptq_cuda_kernel_64.cu(1022): error: no suitable conversion function from "const at::DeprecatedTypeProperties" to "c10::ScalarType" exists
    [&] { const auto& the_type = vec.type(); constexpr const char* at_dispatch_name = "vecquant8matmul_cuda_old"; at::ScalarType _st = ::detail::scalar_type(the_type); ; switch (_st) { case at::ScalarType::Double: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Double)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(1030), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)","dtype '", toString(at::ScalarType::Double), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Double>; return ([&] { VecQuant8MatMulKernel_old<<<blocks, threads>>>( vec.data<scalar_t>(), mat.data<int>(), mul.data<scalar_t>(), scales.data<scalar_t>(), zeros.data<int>(), batch, vec_height, height, width, zero_width, groupsize ); })(); } case at::ScalarType::Float: { do { if constexpr (!at::should_include_kernel_dtype( at_dispatch_name, at::ScalarType::Float)) { if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(1030), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)","dtype '", toString(at::ScalarType::Float), "' not selected for kernel tag ", at_dispatch_name))); }; } } while (0); using scalar_t [[maybe_unused]] = c10::impl::ScalarTypeToCPPTypeT<at::ScalarType::Float>; return ([&] { VecQuant8MatMulKernel_old<<<blocks, threads>>>( vec.data<scalar_t>(), mat.data<int>(), mul.data<scalar_t>(), scales.data<scalar_t>(), zeros.data<int>(), batch, vec_height, height, width, zero_width, groupsize ); })(); } default: if (!(false)) { ::c10::detail::torchCheckFail( __func__, "C:\\AutoGPTQ-0.7.1\\autogptq_extension\\cuda_64\\autogptq_cuda_kernel_64.cu", static_cast<uint32_t>(1030), (::c10::detail::torchCheckMsgImpl( "Expected " "false" " to be true, but got false.  " "(Could this error message be improved?  If so, " "please report an enhancement request to PyTorch.)",'"', at_dispatch_name, "\" not implemented for '", toString(_st), "'"))); }; } }();

                                     ^

8 errors detected in the compilation of "autogptq_extension/cuda_64/autogptq_cuda_kernel_64.cu".
autogptq_cuda_kernel_64.cu
error: command 'C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v12.6\\bin\\nvcc' failed with exit code 2
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
full command: 'C:\Users\123\miniconda3\python.exe' -c '
exec(compile('"'"''"'"''"'"'
# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
#
# - It imports setuptools before invoking setup.py, to enable projects that directly
#   import from `distutils.core` to work with newer packaging standards.
# - It provides a clear error message when setuptools is not installed.
# - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
#   setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
#     manifest_maker: standard file '"'"'-c'"'"' not found".
# - It generates a shim setup.py, for handling setup.cfg-only projects.
import os, sys, tokenize

try:
    import setuptools
except ImportError as error:
    print(
        "ERROR: Can not execute `setup.py` since setuptools is not available in "
        "the build environment.",
        file=sys.stderr,
    )
    sys.exit(1)

__file__ = %r
sys.argv[0] = __file__

if os.path.exists(__file__):
    filename = __file__
    with tokenize.open(__file__) as f:
        setup_py_code = f.read()
else:
    filename = "<auto-generated setuptools caller>"
    setup_py_code = "from setuptools import setup; setup()"

exec(compile(setup_py_code, filename, "exec"))
'"'"''"'"''"'"' % ('"'"'C:\\AutoGPTQ-0.7.1\\setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' develop --no-deps
cwd: C:\AutoGPTQ-0.7.1\\

Rolling back uninstall of auto-gptq
Moving to c:\users\123\miniconda3\lib\site-packages\auto_gptq-0.5.0.dist-info
from C:\Users\123\miniconda3\Lib\site-packages~uto_gptq-0.5.0.dist-info
Moving to c:\users\123\miniconda3\lib\site-packages\auto_gptq
from C:\Users\123\miniconda3\Lib\site-packages~uto_gptq
Moving to c:\users\123\miniconda3\lib\site-packages\autogptq_cuda_256.cp311-win_amd64.pyd
from C:\Users\123\AppData\Local\Temp\pip-uninstall-whchcau4\autogptq_cuda_256.cp311-win_amd64.pyd
Moving to c:\users\123\miniconda3\lib\site-packages\autogptq_cuda_64.cp311-win_amd64.pyd
from C:\Users\123\AppData\Local\Temp\pip-uninstall-whchcau4\autogptq_cuda_64.cp311-win_amd64.pyd
Moving to c:\users\123\miniconda3\lib\site-packages\exllama_kernels.cp311-win_amd64.pyd
from C:\Users\123\AppData\Local\Temp\pip-uninstall-whchcau4\exllama_kernels.cp311-win_amd64.pyd
Moving to c:\users\123\miniconda3\lib\site-packages\exllamav2_kernels.cp311-win_amd64.pyd
from C:\Users\123\AppData\Local\Temp\pip-uninstall-whchcau4\exllamav2_kernels.cp311-win_amd64.pyd
Moving to c:\users\123\miniconda3\lib\site-packages\tests_init_.py
from C:\Users\123\AppData\Local\Temp\pip-uninstall-whchcau4\tests_init_.py
Moving to c:\users\123\miniconda3\lib\site-packages\tests_pycache_
from C:\Users\123\miniconda3\Lib\site-packages\tests~pycache_
Moving to c:\users\123\miniconda3\lib\site-packages\tests\test_peft_conversion.py
from C:\Users\123\AppData\Local\Temp\pip-uninstall-whchcau4\tests\test_peft_conversion.py
Moving to c:\users\123\miniconda3\lib\site-packages\tests\test_q4.py
from C:\Users\123\AppData\Local\Temp\pip-uninstall-whchcau4\tests\test_q4.py
Replacing c:\users\123\miniconda3\lib\site-packages\auto_gptq-0.5.0.dist-info\ from C:\Users\123\miniconda3\Lib\site-packages~uto_gptq-0.5.0.dist-info
Replacing c:\users\123\miniconda3\lib\site-packages\auto_gptq\ from C:\Users\123\miniconda3\Lib\site-packages~uto_gptq
Replacing c:\users\123\miniconda3\lib\site-packages\autogptq_cuda_256.cp311-win_amd64.pyd from C:\Users\123\AppData\Local\Temp\pip-uninstall-whchcau4\autogptq_cuda_256.cp311-win_amd64.pyd
Replacing c:\users\123\miniconda3\lib\site-packages\autogptq_cuda_64.cp311-win_amd64.pyd from C:\Users\123\AppData\Local\Temp\pip-uninstall-whchcau4\autogptq_cuda_64.cp311-win_amd64.pyd
Replacing c:\users\123\miniconda3\lib\site-packages\exllama_kernels.cp311-win_amd64.pyd from C:\Users\123\AppData\Local\Temp\pip-uninstall-whchcau4\exllama_kernels.cp311-win_amd64.pyd
Replacing c:\users\123\miniconda3\lib\site-packages\exllamav2_kernels.cp311-win_amd64.pyd from C:\Users\123\AppData\Local\Temp\pip-uninstall-whchcau4\exllamav2_kernels.cp311-win_amd64.pyd
Replacing c:\users\123\miniconda3\lib\site-packages\tests_init_.py from C:\Users\123\AppData\Local\Temp\pip-uninstall-whchcau4\tests_init_.py
Replacing c:\users\123\miniconda3\lib\site-packages\tests_pycache_\ from C:\Users\123\miniconda3\Lib\site-packages\tests~pycache_
Replacing c:\users\123\miniconda3\lib\site-packages\tests\test_peft_conversion.py from C:\Users\123\AppData\Local\Temp\pip-uninstall-whchcau4\tests\test_peft_conversion.py
Replacing c:\users\123\miniconda3\lib\site-packages\tests\test_q4.py from C:\Users\123\AppData\Local\Temp\pip-uninstall-whchcau4\tests\test_q4.py
Remote version of pip: 25.0.1
Local version of pip: 25.0
Was pip installed by pip? False
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
Exception information:
Traceback (most recent call last):
File "C:\Users\123\miniconda3\Lib\site-packages\pip_internal\cli\base_command.py", line 106, in _run_wrapper
status = _inner_run()
^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\pip_internal\cli\base_command.py", line 97, in inner_run
return self.run(options, args)
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\pip_internal\cli\req_command.py", line 67, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\pip_internal\commands\install.py", line 458, in run
installed = install_given_reqs(
^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\pip_internal\req_init
.py", line 70, in install_given_reqs
requirement.install(
File "C:\Users\123\miniconda3\Lib\site-packages\pip_internal\req\req_install.py", line 850, in install
install_editable_legacy(
File "C:\Users\123\miniconda3\Lib\site-packages\pip_internal\operations\install\editable_legacy.py", line 43, in install_editable
call_subprocess(
File "C:\Users\123\miniconda3\Lib\site-packages\pip_internal\utils\subprocess.py", line 209, in call_subprocess
raise error
pip._internal.exceptions.InstallationSubprocessError: python setup.py develop exited with 1
Removed build tracker: 'C:\Users\123\AppData\Local\Temp\pip-build-tracker-09exf4ay'

@Moemu
Copy link
Owner

Moemu commented Feb 16, 2025

你不是说已经配置好了么

@Moemu
Copy link
Owner

Moemu commented Feb 16, 2025

试着先执行:我在互联网上找不到解决方案

set BUILD_CUDA_EXT=0

作为最后的手段,如果上述命令失败,您可以尝试 python setup.py install

@v191949v
Copy link
Author

谢谢,解决了,但是...这是什么情况

[WARNING] 2025.02.10更新:由于配置文件格式变更,如果先前你拉取过本 Repo 并在 02.10 后执行过fetch操作,请您重新设置模型配置,由此带来的不便我们深表歉意
[INFO] 启动Muice-Chatbot中🚀...
[INFO] 加载配置文件...
[INFO] 配置文件存在,正在读取
[INFO] 加载模型:llmtuner
[INFO|tokenization_utils_base.py:2209] 2025-02-16 13:11:54,044 >> loading file vocab.json
[INFO|tokenization_utils_base.py:2209] 2025-02-16 13:11:54,044 >> loading file merges.txt
[INFO|tokenization_utils_base.py:2209] 2025-02-16 13:11:54,044 >> loading file tokenizer.json
[INFO|tokenization_utils_base.py:2209] 2025-02-16 13:11:54,044 >> loading file added_tokens.json
[INFO|tokenization_utils_base.py:2209] 2025-02-16 13:11:54,044 >> loading file special_tokens_map.json
[INFO|tokenization_utils_base.py:2209] 2025-02-16 13:11:54,044 >> loading file tokenizer_config.json
[INFO|tokenization_utils_base.py:2475] 2025-02-16 13:11:54,319 >> Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
02/16/2025 13:11:54 - INFO - llmtuner.data.template - Replace eos token: <|im_end|>
[INFO|configuration_utils.py:677] 2025-02-16 13:11:54,327 >> loading configuration file E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4\config.json
[INFO|configuration_utils.py:746] 2025-02-16 13:11:54,329 >> Model config Qwen2Config {
"_name_or_path": "E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4",
"architectures": [
"Qwen2ForCausalLM"
],
"attention_dropout": 0.0,
"bos_token_id": 151643,
"eos_token_id": 151645,
"hidden_act": "silu",
"hidden_size": 3584,
"initializer_range": 0.02,
"intermediate_size": 18944,
"max_position_embeddings": 32768,
"max_window_layers": 28,
"model_type": "qwen2",
"num_attention_heads": 28,
"num_hidden_layers": 28,
"num_key_value_heads": 4,
"quantization_config": {
"batch_size": 1,
"bits": 4,
"block_name_to_quantize": null,
"cache_block_outputs": true,
"damp_percent": 0.01,
"dataset": null,
"desc_act": false,
"exllama_config": {
"version": 1
},
"group_size": 128,
"max_input_length": null,
"model_seqlen": null,
"module_name_preceding_first_block": null,
"modules_in_block_to_quantize": null,
"pad_token_id": null,
"quant_method": "gptq",
"sym": true,
"tokenizer": null,
"true_sequential": true,
"use_cuda_fp16": false,
"use_exllama": true
},
"rms_norm_eps": 1e-06,
"rope_scaling": null,
"rope_theta": 1000000.0,
"sliding_window": null,
"tie_word_embeddings": false,
"torch_dtype": "float16",
"transformers_version": "4.46.3",
"use_cache": true,
"use_sliding_window": false,
"vocab_size": 152064
}

02/16/2025 13:11:54 - INFO - llmtuner.model.utils.quantization - Loading 4-bit GPTQ-quantized model.
02/16/2025 13:11:54 - INFO - llmtuner.model.patcher - Using KV cache for faster generation.
CUDA extension not installed.
CUDA extension not installed.
[INFO|modeling_utils.py:3934] 2025-02-16 13:11:54,607 >> loading weights file E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4\model.safetensors.index.json
[INFO|modeling_utils.py:1670] 2025-02-16 13:11:54,616 >> Instantiating Qwen2ForCausalLM model under default dtype torch.float16.
[INFO|configuration_utils.py:1096] 2025-02-16 13:11:54,619 >> Generate config GenerationConfig {
"bos_token_id": 151643,
"eos_token_id": 151645
}

C:\Users\123\miniconda3\Lib\site-packages\transformers\modeling_utils.py:5006: FutureWarning: _is_quantized_training_enabled is going to be deprecated in transformers 4.39.0. Please use model.hf_quantizer.is_trainable instead
warnings.warn(
[WARNING|logging.py:328] 2025-02-16 13:11:54,654 >> loss_type=None was set in the config but it is unrecognised.Using the default loss: ForCausalLMLoss.
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████| 2/2 [00:08<00:00, 4.36s/it]
[INFO|modeling_utils.py:4800] 2025-02-16 13:12:03,774 >> All model checkpoint weights were used when initializing Qwen2ForCausalLM.

[INFO|modeling_utils.py:4808] 2025-02-16 13:12:03,774 >> All the weights of Qwen2ForCausalLM were initialized from the model checkpoint at E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4.
If your task is similar to the task the model of the checkpoint was trained on, you can already use Qwen2ForCausalLM for predictions without further training.
[INFO|configuration_utils.py:1049] 2025-02-16 13:12:03,787 >> loading configuration file E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4\generation_config.json
[INFO|configuration_utils.py:1096] 2025-02-16 13:12:03,787 >> Generate config GenerationConfig {
"bos_token_id": 151643,
"do_sample": true,
"eos_token_id": [
151645,
151643
],
"pad_token_id": 151643,
"repetition_penalty": 1.05,
"temperature": 0.7,
"top_k": 20,
"top_p": 0.8
}

02/16/2025 13:12:03 - INFO - llmtuner.model.utils.attention - Using torch SDPA for faster training and inference.
02/16/2025 13:12:03 - INFO - llmtuner.model.adapter - Upcasting trainable params to float32.
02/16/2025 13:12:03 - INFO - llmtuner.model.adapter - Fine-tuning method: LoRA
Traceback (most recent call last):
File "C:\Users\123\miniconda3\Lib\site-packages\peft\config.py", line 197, in _get_peft_type
config_file = hf_hub_download(
^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\huggingface_hub\utils_validators.py", line 106, in inner_fn
validate_repo_id(arg_value)
File "C:\Users\123\miniconda3\Lib\site-packages\huggingface_hub\utils_validators.py", line 160, in validate_repo_id
raise HFValidationError(
huggingface_hub.errors.HFValidationError: Repo id must use alphanumeric chars or '-', '
', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is 96: 'E:\Muice-Chatbot\model\Muice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4'.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "E:\Muice-Chatbot\main.py", line 26, in
model = model_adapter.llm(model_config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Muice-Chatbot\llm\llmtuner.py", line 17, in init
self.model = ChatModel(dict(
^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\chat\chat_model.py", line 26, in init
self.engine: "BaseEngine" = HuggingfaceEngine(model_args, data_args, finetuning_args, generating_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\chat\hf_engine.py", line 40, in init
self.model = load_model(
^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\model\loader.py", line 144, in load_model
model = init_adapter(config, model, model_args, finetuning_args, is_trainable)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\llmtuner\model\adapter.py", line 164, in init_adapter
model = PeftModel.from_pretrained(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\peft\peft_model.py", line 328, in from_pretrained
PeftConfig._get_peft_type(
File "C:\Users\123\miniconda3\Lib\site-packages\peft\config.py", line 203, in _get_peft_type
raise ValueError(f"Can't find '{CONFIG_NAME}' at '{model_id}'")
ValueError: Can't find 'adapter_config.json' at 'E:\Muice-Chatbot\model\Muice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4'

@Moemu
Copy link
Owner

Moemu commented Feb 16, 2025

你模型少东西了

Image

@v191949v
Copy link
Author

这咋整

[WARNING] 2025.02.10更新:由于配置文件格式变更,如果先前你拉取过本 Repo 并在 02.10 后执行过fetch操作,请您重新设置模型配置,由此带来的不便我们深表歉意
[INFO] 启动Muice-Chatbot中🚀...
[INFO] 加载配置文件...
[INFO] 配置文件存在,正在读取
[INFO] 加载模型:llmtuner
[INFO|tokenization_utils_base.py:2209] 2025-02-16 13:25:45,467 >> loading file vocab.json
[INFO|tokenization_utils_base.py:2209] 2025-02-16 13:25:45,467 >> loading file merges.txt
[INFO|tokenization_utils_base.py:2209] 2025-02-16 13:25:45,469 >> loading file tokenizer.json
[INFO|tokenization_utils_base.py:2209] 2025-02-16 13:25:45,469 >> loading file added_tokens.json
[INFO|tokenization_utils_base.py:2209] 2025-02-16 13:25:45,469 >> loading file special_tokens_map.json
[INFO|tokenization_utils_base.py:2209] 2025-02-16 13:25:45,469 >> loading file tokenizer_config.json
[INFO|tokenization_utils_base.py:2475] 2025-02-16 13:25:45,705 >> Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
02/16/2025 13:25:45 - INFO - llmtuner.data.template - Replace eos token: <|im_end|>
[INFO|configuration_utils.py:677] 2025-02-16 13:25:45,707 >> loading configuration file E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4\config.json
[INFO|configuration_utils.py:746] 2025-02-16 13:25:45,709 >> Model config Qwen2Config {
"_name_or_path": "E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4",
"architectures": [
"Qwen2ForCausalLM"
],
"attention_dropout": 0.0,
"bos_token_id": 151643,
"eos_token_id": 151645,
"hidden_act": "silu",
"hidden_size": 3584,
"initializer_range": 0.02,
"intermediate_size": 18944,
"max_position_embeddings": 32768,
"max_window_layers": 28,
"model_type": "qwen2",
"num_attention_heads": 28,
"num_hidden_layers": 28,
"num_key_value_heads": 4,
"quantization_config": {
"batch_size": 1,
"bits": 4,
"block_name_to_quantize": null,
"cache_block_outputs": true,
"damp_percent": 0.01,
"dataset": null,
"desc_act": false,
"exllama_config": {
"version": 1
},
"group_size": 128,
"max_input_length": null,
"model_seqlen": null,
"module_name_preceding_first_block": null,
"modules_in_block_to_quantize": null,
"pad_token_id": null,
"quant_method": "gptq",
"sym": true,
"tokenizer": null,
"true_sequential": true,
"use_cuda_fp16": false,
"use_exllama": true
},
"rms_norm_eps": 1e-06,
"rope_scaling": null,
"rope_theta": 1000000.0,
"sliding_window": null,
"tie_word_embeddings": false,
"torch_dtype": "float16",
"transformers_version": "4.46.3",
"use_cache": true,
"use_sliding_window": false,
"vocab_size": 152064
}

02/16/2025 13:25:45 - INFO - llmtuner.model.utils.quantization - Loading 4-bit GPTQ-quantized model.
02/16/2025 13:25:45 - INFO - llmtuner.model.patcher - Using KV cache for faster generation.
CUDA extension not installed.
CUDA extension not installed.
[INFO|modeling_utils.py:3934] 2025-02-16 13:25:45,950 >> loading weights file E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4\model.safetensors.index.json
[INFO|modeling_utils.py:1670] 2025-02-16 13:25:45,952 >> Instantiating Qwen2ForCausalLM model under default dtype torch.float16.
[INFO|configuration_utils.py:1096] 2025-02-16 13:25:45,954 >> Generate config GenerationConfig {
"bos_token_id": 151643,
"eos_token_id": 151645
}

C:\Users\123\miniconda3\Lib\site-packages\transformers\modeling_utils.py:5006: FutureWarning: _is_quantized_training_enabled is going to be deprecated in transformers 4.39.0. Please use model.hf_quantizer.is_trainable instead
warnings.warn(
[WARNING|logging.py:328] 2025-02-16 13:25:45,973 >> loss_type=None was set in the config but it is unrecognised.Using the default loss: ForCausalLMLoss.
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████| 2/2 [00:02<00:00, 1.48s/it]
[INFO|modeling_utils.py:4800] 2025-02-16 13:25:49,362 >> All model checkpoint weights were used when initializing Qwen2ForCausalLM.

[INFO|modeling_utils.py:4808] 2025-02-16 13:25:49,362 >> All the weights of Qwen2ForCausalLM were initialized from the model checkpoint at E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4.
If your task is similar to the task the model of the checkpoint was trained on, you can already use Qwen2ForCausalLM for predictions without further training.
[INFO|configuration_utils.py:1049] 2025-02-16 13:25:49,367 >> loading configuration file E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4\generation_config.json
[INFO|configuration_utils.py:1096] 2025-02-16 13:25:49,367 >> Generate config GenerationConfig {
"bos_token_id": 151643,
"do_sample": true,
"eos_token_id": [
151645,
151643
],
"pad_token_id": 151643,
"repetition_penalty": 1.05,
"temperature": 0.7,
"top_k": 20,
"top_p": 0.8
}

02/16/2025 13:25:49 - INFO - llmtuner.model.utils.attention - Using torch SDPA for faster training and inference.
02/16/2025 13:25:49 - INFO - llmtuner.model.adapter - Upcasting trainable params to float32.
02/16/2025 13:25:49 - INFO - llmtuner.model.adapter - Fine-tuning method: LoRA
02/16/2025 13:25:50 - INFO - llmtuner.model.adapter - Loaded adapter(s): E:\Muice-Chatbot\model\Muice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4
02/16/2025 13:25:50 - INFO - llmtuner.model.loader - all params: 1110384128
[INFO] 初始化Bot服务...
Traceback (most recent call last):
File "E:\Muice-Chatbot\main.py", line 57, in
ws_app = QQBot(muice_app, configs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Muice-Chatbot\ws.py", line 75, in init
from apscheduler.schedulers.asyncio import AsyncIOScheduler
ModuleNotFoundError: No module named 'apscheduler'
Exception in thread Thread-4 (command_thread):
Traceback (most recent call last):
File "C:\Users\123\miniconda3\Lib\threading.py", line 1045, in _bootstrap_inner
self.run()
File "C:\Users\123\miniconda3\Lib\threading.py", line 982, in run
self._target(*self._args, **self._kwargs)
File "E:\Muice-Chatbot\utils\command.py", line 96, in command_thread
im_text = AutoPrompt.prompt()
^^^^^^^^^^^^^^^^^^^
File "E:\Muice-Chatbot\utils\auto_prompt.py", line 19, in prompt
text = prompt(
^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\prompt_toolkit\shortcuts\prompt.py", line 1425, in prompt
return session.prompt(
^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\prompt_toolkit\shortcuts\prompt.py", line 1035, in prompt
return self.app.run(
^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\prompt_toolkit\application\application.py", line 1002, in run
return asyncio.run(coro)
^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\asyncio\runners.py", line 190, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\asyncio\base_events.py", line 654, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\prompt_toolkit\application\application.py", line 886, in run_async
return await _run_async(f)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\prompt_toolkit\application\application.py", line 734, in _run_async
with self.input.raw_mode(), self.input.attach(
File "C:\Users\123\miniconda3\Lib\contextlib.py", line 137, in enter
return next(self.gen)
^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\site-packages\prompt_toolkit\input\win32.py", line 773, in attach_win32_input
win32_handles.add_win32_handle(handle, callback)
File "C:\Users\123\miniconda3\Lib\site-packages\prompt_toolkit\input\win32.py", line 731, in add_win32_handle
run_in_executor_with_context(wait, loop=loop)
File "C:\Users\123\miniconda3\Lib\site-packages\prompt_toolkit\eventloop\utils.py", line 34, in run_in_executor_with_context
return loop.run_in_executor(None, ctx.run, func, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\asyncio\base_events.py", line 830, in run_in_executor
executor.submit(func, *args), loop=self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\concurrent\futures\thread.py", line 169, in submit
raise RuntimeError('cannot schedule new futures after '
RuntimeError: cannot schedule new futures after interpreter shutdown

@Moemu
Copy link
Owner

Moemu commented Feb 16, 2025

ModuleNotFoundError: No module named 'apscheduler'

pip install apscheduler

@v191949v
Copy link
Author

成功了...?

[WARNING] 2025.02.10更新:由于配置文件格式变更,如果先前你拉取过本 Repo 并在 02.10 后执行过fetch操作,请您重新设置模型配置,由此带来的不便我们深表歉意
[INFO] 启动Muice-Chatbot中🚀...
[INFO] 加载配置文件...
[INFO] 配置文件存在,正在读取
[INFO] 加载模型:llmtuner
[INFO|tokenization_utils_base.py:2209] 2025-02-16 13:44:37,905 >> loading file vocab.json
[INFO|tokenization_utils_base.py:2209] 2025-02-16 13:44:37,905 >> loading file merges.txt
[INFO|tokenization_utils_base.py:2209] 2025-02-16 13:44:37,906 >> loading file tokenizer.json
[INFO|tokenization_utils_base.py:2209] 2025-02-16 13:44:37,906 >> loading file added_tokens.json
[INFO|tokenization_utils_base.py:2209] 2025-02-16 13:44:37,906 >> loading file special_tokens_map.json
[INFO|tokenization_utils_base.py:2209] 2025-02-16 13:44:37,906 >> loading file tokenizer_config.json
[INFO|tokenization_utils_base.py:2475] 2025-02-16 13:44:38,116 >> Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
02/16/2025 13:44:38 - INFO - llmtuner.data.template - Replace eos token: <|im_end|>
[INFO|configuration_utils.py:677] 2025-02-16 13:44:38,118 >> loading configuration file E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4\config.json
[INFO|configuration_utils.py:746] 2025-02-16 13:44:38,119 >> Model config Qwen2Config {
"_name_or_path": "E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4",
"architectures": [
"Qwen2ForCausalLM"
],
"attention_dropout": 0.0,
"bos_token_id": 151643,
"eos_token_id": 151645,
"hidden_act": "silu",
"hidden_size": 3584,
"initializer_range": 0.02,
"intermediate_size": 18944,
"max_position_embeddings": 32768,
"max_window_layers": 28,
"model_type": "qwen2",
"num_attention_heads": 28,
"num_hidden_layers": 28,
"num_key_value_heads": 4,
"quantization_config": {
"batch_size": 1,
"bits": 4,
"block_name_to_quantize": null,
"cache_block_outputs": true,
"damp_percent": 0.01,
"dataset": null,
"desc_act": false,
"exllama_config": {
"version": 1
},
"group_size": 128,
"max_input_length": null,
"model_seqlen": null,
"module_name_preceding_first_block": null,
"modules_in_block_to_quantize": null,
"pad_token_id": null,
"quant_method": "gptq",
"sym": true,
"tokenizer": null,
"true_sequential": true,
"use_cuda_fp16": false,
"use_exllama": true
},
"rms_norm_eps": 1e-06,
"rope_scaling": null,
"rope_theta": 1000000.0,
"sliding_window": null,
"tie_word_embeddings": false,
"torch_dtype": "float16",
"transformers_version": "4.46.3",
"use_cache": true,
"use_sliding_window": false,
"vocab_size": 152064
}

02/16/2025 13:44:38 - INFO - llmtuner.model.utils.quantization - Loading 4-bit GPTQ-quantized model.
02/16/2025 13:44:38 - INFO - llmtuner.model.patcher - Using KV cache for faster generation.
CUDA extension not installed.
CUDA extension not installed.
[INFO|modeling_utils.py:3934] 2025-02-16 13:44:38,329 >> loading weights file E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4\model.safetensors.index.json
[INFO|modeling_utils.py:1670] 2025-02-16 13:44:38,330 >> Instantiating Qwen2ForCausalLM model under default dtype torch.float16.
[INFO|configuration_utils.py:1096] 2025-02-16 13:44:38,332 >> Generate config GenerationConfig {
"bos_token_id": 151643,
"eos_token_id": 151645
}

C:\Users\123\miniconda3\Lib\site-packages\transformers\modeling_utils.py:5006: FutureWarning: _is_quantized_training_enabled is going to be deprecated in transformers 4.39.0. Please use model.hf_quantizer.is_trainable instead
warnings.warn(
[WARNING|logging.py:328] 2025-02-16 13:44:38,351 >> loss_type=None was set in the config but it is unrecognised.Using the default loss: ForCausalLMLoss.
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████| 2/2 [00:02<00:00, 1.31s/it]
[INFO|modeling_utils.py:4800] 2025-02-16 13:44:41,361 >> All model checkpoint weights were used when initializing Qwen2ForCausalLM.

[INFO|modeling_utils.py:4808] 2025-02-16 13:44:41,362 >> All the weights of Qwen2ForCausalLM were initialized from the model checkpoint at E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4.
If your task is similar to the task the model of the checkpoint was trained on, you can already use Qwen2ForCausalLM for predictions without further training.
[INFO|configuration_utils.py:1049] 2025-02-16 13:44:41,365 >> loading configuration file E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4\generation_config.json
[INFO|configuration_utils.py:1096] 2025-02-16 13:44:41,365 >> Generate config GenerationConfig {
"bos_token_id": 151643,
"do_sample": true,
"eos_token_id": [
151645,
151643
],
"pad_token_id": 151643,
"repetition_penalty": 1.05,
"temperature": 0.7,
"top_k": 20,
"top_p": 0.8
}

02/16/2025 13:44:41 - INFO - llmtuner.model.utils.attention - Using torch SDPA for faster training and inference.
02/16/2025 13:44:41 - INFO - llmtuner.model.adapter - Upcasting trainable params to float32.
02/16/2025 13:44:41 - INFO - llmtuner.model.adapter - Fine-tuning method: LoRA
02/16/2025 13:44:42 - INFO - llmtuner.model.adapter - Loaded adapter(s): E:\Muice-Chatbot\model\Muice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4
02/16/2025 13:44:42 - INFO - llmtuner.model.loader - all params: 1110384128
[INFO] 初始化Bot服务...

[INFO] 尝试与QQ建立WebSocket连接...
INFO: Started server process [9756]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:21050 (Press CTRL+C to quit)

@v191949v
Copy link
Author

额...都已经到这步了,我发消息机器人不跟我说话,点击下面的链接会出现404错误

[WARNING] 2025.02.10更新:由于配置文件格式变更,如果先前你拉取过本 Repo 并在 02.10 后执行过fetch操作,请您重新设置模型配置,由此带来的不便我们深表歉意
[INFO] 启动Muice-Chatbot中🚀...
[INFO] 加载配置文件...
[INFO] 配置文件存在,正在读取
[INFO] 加载模型:llmtuner
[INFO|tokenization_utils_base.py:2209] 2025-02-16 15:01:41,061 >> loading file vocab.json
[INFO|tokenization_utils_base.py:2209] 2025-02-16 15:01:41,061 >> loading file merges.txt
[INFO|tokenization_utils_base.py:2209] 2025-02-16 15:01:41,061 >> loading file tokenizer.json
[INFO|tokenization_utils_base.py:2209] 2025-02-16 15:01:41,061 >> loading file added_tokens.json
[INFO|tokenization_utils_base.py:2209] 2025-02-16 15:01:41,061 >> loading file special_tokens_map.json
[INFO|tokenization_utils_base.py:2209] 2025-02-16 15:01:41,061 >> loading file tokenizer_config.json
[INFO|tokenization_utils_base.py:2475] 2025-02-16 15:01:41,327 >> Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
02/16/2025 15:01:41 - INFO - llmtuner.data.template - Replace eos token: <|im_end|>
[INFO|configuration_utils.py:677] 2025-02-16 15:01:41,330 >> loading configuration file E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4\config.json
[INFO|configuration_utils.py:746] 2025-02-16 15:01:41,332 >> Model config Qwen2Config {
"_name_or_path": "E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4",
"architectures": [
"Qwen2ForCausalLM"
],
"attention_dropout": 0.0,
"bos_token_id": 151643,
"eos_token_id": 151645,
"hidden_act": "silu",
"hidden_size": 3584,
"initializer_range": 0.02,
"intermediate_size": 18944,
"max_position_embeddings": 32768,
"max_window_layers": 28,
"model_type": "qwen2",
"num_attention_heads": 28,
"num_hidden_layers": 28,
"num_key_value_heads": 4,
"quantization_config": {
"batch_size": 1,
"bits": 4,
"block_name_to_quantize": null,
"cache_block_outputs": true,
"damp_percent": 0.01,
"dataset": null,
"desc_act": false,
"exllama_config": {
"version": 1
},
"group_size": 128,
"max_input_length": null,
"model_seqlen": null,
"module_name_preceding_first_block": null,
"modules_in_block_to_quantize": null,
"pad_token_id": null,
"quant_method": "gptq",
"sym": true,
"tokenizer": null,
"true_sequential": true,
"use_cuda_fp16": false,
"use_exllama": true
},
"rms_norm_eps": 1e-06,
"rope_scaling": null,
"rope_theta": 1000000.0,
"sliding_window": null,
"tie_word_embeddings": false,
"torch_dtype": "float16",
"transformers_version": "4.46.3",
"use_cache": true,
"use_sliding_window": false,
"vocab_size": 152064
}

02/16/2025 15:01:41 - INFO - llmtuner.model.utils.quantization - Loading 4-bit GPTQ-quantized model.
02/16/2025 15:01:41 - INFO - llmtuner.model.patcher - Using KV cache for faster generation.
CUDA extension not installed.
CUDA extension not installed.
[INFO|modeling_utils.py:3934] 2025-02-16 15:01:41,546 >> loading weights file E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4\model.safetensors.index.json
[INFO|modeling_utils.py:1670] 2025-02-16 15:01:41,547 >> Instantiating Qwen2ForCausalLM model under default dtype torch.float16.
[INFO|configuration_utils.py:1096] 2025-02-16 15:01:41,548 >> Generate config GenerationConfig {
"bos_token_id": 151643,
"eos_token_id": 151645
}

C:\Users\123\miniconda3\Lib\site-packages\transformers\modeling_utils.py:5006: FutureWarning: _is_quantized_training_enabled is going to be deprecated in transformers 4.39.0. Please use model.hf_quantizer.is_trainable instead
warnings.warn(
[WARNING|logging.py:328] 2025-02-16 15:01:41,568 >> loss_type=None was set in the config but it is unrecognised.Using the default loss: ForCausalLMLoss.
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████| 2/2 [00:02<00:00, 1.50s/it]
[INFO|modeling_utils.py:4800] 2025-02-16 15:01:45,014 >> All model checkpoint weights were used when initializing Qwen2ForCausalLM.

[INFO|modeling_utils.py:4808] 2025-02-16 15:01:45,014 >> All the weights of Qwen2ForCausalLM were initialized from the model checkpoint at E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4.
If your task is similar to the task the model of the checkpoint was trained on, you can already use Qwen2ForCausalLM for predictions without further training.
[INFO|configuration_utils.py:1049] 2025-02-16 15:01:45,021 >> loading configuration file E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4\generation_config.json
[INFO|configuration_utils.py:1096] 2025-02-16 15:01:45,021 >> Generate config GenerationConfig {
"bos_token_id": 151643,
"do_sample": true,
"eos_token_id": [
151645,
151643
],
"pad_token_id": 151643,
"repetition_penalty": 1.05,
"temperature": 0.7,
"top_k": 20,
"top_p": 0.8
}

02/16/2025 15:01:45 - INFO - llmtuner.model.utils.attention - Using torch SDPA for faster training and inference.
02/16/2025 15:01:45 - INFO - llmtuner.model.adapter - Upcasting trainable params to float32.
02/16/2025 15:01:45 - INFO - llmtuner.model.adapter - Fine-tuning method: LoRA
02/16/2025 15:01:45 - INFO - llmtuner.model.adapter - Loaded adapter(s): E:\Muice-Chatbot\model\Muice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4
02/16/2025 15:01:45 - INFO - llmtuner.model.loader - all params: 1110384128
[INFO] 初始化Bot服务...

[INFO] 尝试与QQ建立WebSocket连接...
INFO: Started server process [4188]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:21050 (Press CTRL+C to quit)
INFO: 127.0.0.1:52771 - "GET / HTTP/1.1" 404 Not Found

Image

@Moemu
Copy link
Owner

Moemu commented Feb 16, 2025

#46

@v191949v
Copy link
Author

啊嘞?

[WARNING] 2025.02.10更新:由于配置文件格式变更,如果先前你拉取过本 Repo 并在 02.10 后执行过fetch操作,请您重新设置模型配置,由此带来的不便我们深表歉意
[INFO] 启动Muice-Chatbot中🚀...
[INFO] 加载配置文件...
[INFO] 配置文件存在,正在读取
[INFO] 加载模型:llmtuner
[INFO|tokenization_utils_base.py:2209] 2025-02-16 15:40:34,545 >> loading file vocab.json
[INFO|tokenization_utils_base.py:2209] 2025-02-16 15:40:34,545 >> loading file merges.txt
[INFO|tokenization_utils_base.py:2209] 2025-02-16 15:40:34,545 >> loading file tokenizer.json
[INFO|tokenization_utils_base.py:2209] 2025-02-16 15:40:34,545 >> loading file added_tokens.json
[INFO|tokenization_utils_base.py:2209] 2025-02-16 15:40:34,545 >> loading file special_tokens_map.json
[INFO|tokenization_utils_base.py:2209] 2025-02-16 15:40:34,545 >> loading file tokenizer_config.json
[INFO|tokenization_utils_base.py:2475] 2025-02-16 15:40:34,760 >> Special tokens have been added in the vocabulary, make sure the associated word embeddings are fine-tuned or trained.
02/16/2025 15:40:34 - INFO - llmtuner.data.template - Replace eos token: <|im_end|>
[INFO|configuration_utils.py:677] 2025-02-16 15:40:34,762 >> loading configuration file E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4\config.json
[INFO|configuration_utils.py:746] 2025-02-16 15:40:34,767 >> Model config Qwen2Config {
"_name_or_path": "E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4",
"architectures": [
"Qwen2ForCausalLM"
],
"attention_dropout": 0.0,
"bos_token_id": 151643,
"eos_token_id": 151645,
"hidden_act": "silu",
"hidden_size": 3584,
"initializer_range": 0.02,
"intermediate_size": 18944,
"max_position_embeddings": 32768,
"max_window_layers": 28,
"model_type": "qwen2",
"num_attention_heads": 28,
"num_hidden_layers": 28,
"num_key_value_heads": 4,
"quantization_config": {
"batch_size": 1,
"bits": 4,
"block_name_to_quantize": null,
"cache_block_outputs": true,
"damp_percent": 0.01,
"dataset": null,
"desc_act": false,
"exllama_config": {
"version": 1
},
"group_size": 128,
"max_input_length": null,
"model_seqlen": null,
"module_name_preceding_first_block": null,
"modules_in_block_to_quantize": null,
"pad_token_id": null,
"quant_method": "gptq",
"sym": true,
"tokenizer": null,
"true_sequential": true,
"use_cuda_fp16": false,
"use_exllama": true
},
"rms_norm_eps": 1e-06,
"rope_scaling": null,
"rope_theta": 1000000.0,
"sliding_window": null,
"tie_word_embeddings": false,
"torch_dtype": "float16",
"transformers_version": "4.46.3",
"use_cache": true,
"use_sliding_window": false,
"vocab_size": 152064
}

02/16/2025 15:40:34 - INFO - llmtuner.model.utils.quantization - Loading 4-bit GPTQ-quantized model.
02/16/2025 15:40:34 - INFO - llmtuner.model.patcher - Using KV cache for faster generation.
CUDA extension not installed.
CUDA extension not installed.
[INFO|modeling_utils.py:3934] 2025-02-16 15:40:34,982 >> loading weights file E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4\model.safetensors.index.json
[INFO|modeling_utils.py:1670] 2025-02-16 15:40:34,982 >> Instantiating Qwen2ForCausalLM model under default dtype torch.float16.
[INFO|configuration_utils.py:1096] 2025-02-16 15:40:34,983 >> Generate config GenerationConfig {
"bos_token_id": 151643,
"eos_token_id": 151645
}

C:\Users\123\miniconda3\Lib\site-packages\transformers\modeling_utils.py:5006: FutureWarning: _is_quantized_training_enabled is going to be deprecated in transformers 4.39.0. Please use model.hf_quantizer.is_trainable instead
warnings.warn(
[WARNING|logging.py:328] 2025-02-16 15:40:35,003 >> loss_type=None was set in the config but it is unrecognised.Using the default loss: ForCausalLMLoss.
Loading checkpoint shards: 100%|█████████████████████████████████████████████████████████| 2/2 [00:02<00:00, 1.31s/it]
[INFO|modeling_utils.py:4800] 2025-02-16 15:40:38,016 >> All model checkpoint weights were used when initializing Qwen2ForCausalLM.

[INFO|modeling_utils.py:4808] 2025-02-16 15:40:38,016 >> All the weights of Qwen2ForCausalLM were initialized from the model checkpoint at E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4.
If your task is similar to the task the model of the checkpoint was trained on, you can already use Qwen2ForCausalLM for predictions without further training.
[INFO|configuration_utils.py:1049] 2025-02-16 15:40:38,019 >> loading configuration file E:\Muice-Chatbot\model\Qwen2.5-7B-Instruct-GPTQ-Int4\generation_config.json
[INFO|configuration_utils.py:1096] 2025-02-16 15:40:38,019 >> Generate config GenerationConfig {
"bos_token_id": 151643,
"do_sample": true,
"eos_token_id": [
151645,
151643
],
"pad_token_id": 151643,
"repetition_penalty": 1.05,
"temperature": 0.7,
"top_k": 20,
"top_p": 0.8
}

02/16/2025 15:40:38 - INFO - llmtuner.model.utils.attention - Using torch SDPA for faster training and inference.
02/16/2025 15:40:38 - INFO - llmtuner.model.adapter - Upcasting trainable params to float32.
02/16/2025 15:40:38 - INFO - llmtuner.model.adapter - Fine-tuning method: LoRA
02/16/2025 15:40:38 - INFO - llmtuner.model.adapter - Loaded adapter(s): E:\Muice-Chatbot\model\Muice-2.7.1-Qwen2.5-7B-Instruct-GPTQ-Int4-8e-4
02/16/2025 15:40:38 - INFO - llmtuner.model.loader - all params: 1110384128
[INFO] 初始化Bot服务...

[INFO] 尝试与QQ建立WebSocket连接...
INFO: Started server process [2596]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://127.0.0.1:21050 (Press CTRL+C to quit)
INFO: ('127.0.0.1', 53569) - "WebSocket /ws/api" [accepted]
INFO: connection open
[INFO] 沐雪Chatbot已在运行中✨
[ERROR] 处理消息时发生错误: expected string or bytes-like object, got 'list'
[ERROR] 接收到的数据: {"self_id": 1718479057, "user_id": 1218732954, "time": 1739691964, "message_id": 1821147032, "message_seq": 1315898, "message_type": "group", "sender": {"user_id": 1218732954, "nickname": "炼兜", "card": "兜", "role": "member", "title": ""}, "raw_message": "孤独摇滚要出第二季了", "font": 14, "sub_type": "normal", "message": [{"type": "text", "data": {"text": "孤独摇滚要出第二季了"}}], "message_format": "array", "post_type": "message", "group_id": 777879371}
[ERROR] expected string or bytes-like object, got 'list'
Traceback (most recent call last):
File "E:\Muice-Chatbot\ws.py", line 164, in processing_reply
is_image, image_url = is_image_message(self.is_cq_code, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Muice-Chatbot\utils\Tools.py", line 95, in is_image_message
image_match = re.search(url_pattern, message)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\re_init_.py", line 176, in search
return compile(pattern, flags).search(string)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'list'
[ERROR] 处理消息时发生错误: expected string or bytes-like object, got 'list'
[ERROR] 接收到的数据: {"self_id": 1718479057, "user_id": 1218732954, "time": 1739691965, "message_id": 856210356, "message_seq": 1315899, "message_type": "group", "sender": {"user_id": 1218732954, "nickname": "炼兜", "card": "兜", "role": "member", "title": ""}, "raw_message": "[CQ:image,file=EB877AD732674820D8021C218286DF1A.jpg,subType=1,url=https://multimedia.nt.qq.com.cn/download?appid=1407&fileid=EhTzExj784SqH993WfYnAb4QgG0YlhjDuQIg_woo5cXbzNnHiwMyBHByb2RQgL2jAVoQiCwG6vaMlg15vi9Oyh_mLg&spec=0&rkey=CAMSKMa3OFokB_TlPxsA__ewaC7i1nox5FKFS5TvKL_aIl0oklXCgH5UNks,file_size=40131]", "font": 14, "sub_type": "normal", "message": [{"type": "image", "data": {"file": "EB877AD732674820D8021C218286DF1A.jpg", "subType": 1, "url": "https://multimedia.nt.qq.com.cn/download?appid=1407&fileid=EhTzExj784SqH993WfYnAb4QgG0YlhjDuQIg_woo5cXbzNnHiwMyBHByb2RQgL2jAVoQiCwG6vaMlg15vi9Oyh_mLg&spec=0&rkey=CAMSKMa3OFokB_TlPxsA__ewaC7i1nox5FKFS5TvKL_aIl0oklXCgH5UNks", "file_size": "40131"}}], "message_format": "array", "post_type": "message", "group_id": 777879371}
[ERROR] expected string or bytes-like object, got 'list'
Traceback (most recent call last):
File "E:\Muice-Chatbot\ws.py", line 164, in processing_reply
is_image, image_url = is_image_message(self.is_cq_code, data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Muice-Chatbot\utils\Tools.py", line 95, in is_image_message
image_match = re.search(url_pattern, message)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\123\miniconda3\Lib\re_init
.py", line 176, in search
return _compile(pattern, flags).search(string)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: expected string or bytes-like object, got 'list'

Image

@Moemu
Copy link
Owner

Moemu commented Feb 16, 2025

#67 (comment)

@v191949v
Copy link
Author

没看明白要怎么操作...

@Moemu
Copy link
Owner

Moemu commented Feb 16, 2025

改配置文件大哥,就改这一行

@v191949v
Copy link
Author

OK,解决了

@Moemu Moemu added wontfix This will not be worked on and removed bug Something isn't working labels Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants