在openi启智社区的dcu bw1000使用llama.cpp推理 stelterlab/Qwen3-Coder-30B-A3B-Instruct-AWQ(失败)

openi启智社区的dcu新推出 bw1000计算卡,不耗费积分,可以可劲用!

但是提供的镜像只有一个,感觉用起来很麻烦....

用llmfit看看模型情况

llmfit info stelterlab/Qwen3-Coder-30B-A3B-Instruct-AWQ

=== stelterlab/Qwen3-Coder-30B-A3B-Instruct-AWQ ===

Provider: stelterlab
Parameters: 4.6B
Quantization: Q4_K_M
Best Quant: Q8_0
Context Length: 262144 tokens
Use Case: Code generation and completion
Category: Coding
Released: 2025-07-31
Runtime: llama.cpp (est. ~17.2 tok/s)

Score Breakdown:
  Overall Score: 66.7 / 100
  Quality: 68  Speed: 43  Fit: 61  Context: 100
  Estimated Speed: 17.2 tok/s

Resource Requirements:
  Min VRAM: 2.4 GB
  Min RAM: 2.6 GB (CPU inference)
  Recommended RAM: 4.3 GB

MoE Architecture:
  Experts: 8 active / 128 total per token
  Active VRAM: 0.5 GB (vs 2.4 GB full model)

Fit Analysis:
  Status: 🟡 Good
  Run Mode: CPU+GPU
  Memory Utilization: 0.6% (2.6 / 405.5 GB)

Notes:
  MoE: insufficient VRAM for expert offloading
  Spilling entire model to system RAM
  Performance will be significantly reduced
  Best quantization for hardware: Q8_0 (model default: Q4_K_M)
  Estimated speed: 17.2 tok/s

安装llama.cpp

下载 llama.cpp源代码

git clone https://gitcode.com/GitHub_Trending/ll/llama.cpp

编译llama.cpp

cd llama.cpp cmake -B build cmake --build build --config Release


加入路径
 

export PATH=/root/llama.cpp/build/bin:$PATH

或者也可以直击用make install

cd build make install 

但是安装好后报错

oot@crdnotebook-2027598444851879937-denglf-12859:~/llama.cpp/build# llama-cli llama-cli: error while loading shared libraries: libmtmd.so.0: cannot open shared object file: No such file or directory root@crdnotebook-2027598444851879937-denglf-12859:~/llama.cpp/build# llama-gguf llama-gguf: error while loading shared libraries: libggml-base.so.0: cannot open shared object file: No such file or directory

原来是没有把路径加入的缘故,加入路径,问题解决:

export PATH=/root/llama.cpp/build/bin:$PATH

模型下载

安装modelscope

pip install modelscope

下载

from modelscope import snapshot_download snapshot_download('tclf90/Qwen3-Coder-30B-A3B-Instruct-AWQ', cache_dir="models")

推理

用llama-cli推理

llama-cli -m models/tclf90/Qwen3-Coder-30B-A3B-Instruct-AWQ

报错:

root@crdnotebook-2027598444851879937-denglf-12859:~# llama-cli -m models/tclf90/Qwen3-Coder-30B-A3B-Instruct-AWQ

Loading model... |gguf_init_from_file_impl: failed to read magic
llama_model_load: error loading model: llama_model_loader: failed to load model from models/tclf90/Qwen3-Coder-30B-A3B-Instruct-AWQ
llama_model_load_from_file_impl: failed to load model
llama_params_fit: encountered an error while trying to fit params to free device memory: failed to load model
gguf_init_from_file_impl: failed to read magic
llama_model_load: error loading model: llama_model_loader: failed to load model from models/tclf90/Qwen3-Coder-30B-A3B-Instruct-AWQ
llama_model_load_from_file_impl: failed to load model
common_init_from_params: failed to load model 'models/tclf90/Qwen3-Coder-30B-A3B-Instruct-AWQ'
srv    load_model: failed to load model, 'models/tclf90/Qwen3-Coder-30B-A3B-Instruct-AWQ'
 
Failed to load the model

看了一下,应该是这个模型: stelterlab/Qwen3-Coder-30B-A3B-Instruct-AWQ

问题是这个模型魔搭没有....

尝试用transformers推理

from transformers import AutoModelForCausalLM, AutoTokenizer model_name = "/root/models/tclf90/Qwen3-Coder-30B-A3B-Instruct-AWQ" # load the tokenizer and the model tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForCausalLM.from_pretrained( model_name, torch_dtype="auto", device_map="auto" ) # prepare the model input prompt = "Write a quick sort algorithm." messages = [ {"role": "user", "content": prompt} ] text = tokenizer.apply_chat_template( messages, tokenize=False, add_generation_prompt=True, ) model_inputs = tokenizer([text], return_tensors="pt").to(model.device) # conduct text completion generated_ids = model.generate( **model_inputs, max_new_tokens=65536 ) output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist() content = tokenizer.decode(output_ids, skip_special_tokens=True) print("content:", content) 

也是失败

File /opt/conda/lib/python3.10/site-packages/transformers/quantizers/quantizer_awq.py:48, in AwqQuantizer.validate_environment(self, **kwargs) 46 def validate_environment(self, **kwargs): 47 if not is_gptqmodel_available(): ---> 48 raise ImportError( 49 "Loading an AWQ quantized model requires gptqmodel. Please install it with `pip install gptqmodel`" 50 ) 52 if not is_accelerate_available(): 53 raise ImportError("Loading an AWQ quantized model requires accelerate (`pip install accelerate`)") ImportError: Loading an AWQ quantized model requires gptqmodel. Please install it with `pip install gptqmodel`

总结

没调通,先搁置

llama.cpp是因为魔搭没有那个模型,所以模型不匹配

transformers是因为库的问题,需要重新安装torch等库,导致需要的库无法安装上,推理失败。

调试

报错ImportError: Loading an AWQ quantized model requires gptqmodel.

File /opt/conda/lib/python3.10/site-packages/transformers/quantizers/quantizer_awq.py:48, in AwqQuantizer.validate_environment(self, **kwargs) 46 def validate_environment(self, **kwargs): 47 if not is_gptqmodel_available(): ---> 48 raise ImportError( 49 "Loading an AWQ quantized model requires gptqmodel. Please install it with `pip install gptqmodel`" 50 ) 52 if not is_accelerate_available(): 53 raise ImportError("Loading an AWQ quantized model requires accelerate (`pip install accelerate`)") ImportError: Loading an AWQ quantized model requires gptqmodel. Please install it with `pip install gptqmodel`

安装提示执行

pip install gptqmodel

安装失败,

 Exception: Unable to detect torch version via uv/pip/conda/importlib. Please install torch >= 2.7.1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed to build 'gptqmodel' when getting requirements to build wheel

用conda试试

conda install gptqmodel

也失败了。

PackagesNotFoundError: The following packages are not available from current channels:

  - gptqmodel

Read more

2025.10.17 更新 AI绘画秋葉aaaki整合包 Stable Diffusion整合包v4.10 +ComfyUI整合包下载地址

2025.10.17 更新 AI绘画秋葉aaaki整合包 Stable Diffusion整合包v4.10 +ComfyUI整合包下载地址

2025.10.17 更新 AI绘画秋葉aaaki整合包 Stable Diffusion整合包v4.10 +ComfyUI整合包下载地址 * @[TOC](2025.10.17 更新 AI绘画秋葉aaaki整合包 Stable Diffusion整合包v4.10 +ComfyUI整合包下载地址) * 🌈 Stable Diffusion整合包(秋葉aaaki整合版) * 📦 【下载链接】 * 💡 英特尔 CPU 用户特别提醒 * 🔧 AMD 显卡专用方案 * ⚙️ 常见问题与解决方案 * 🧠 ComfyUI 整合包(秋葉aaaki定制优化版) * 📥 【下载链接】 * 🚀 更新日志(2025.2.4 v1.6) * 🧩 报错解决 关键词建议(自动覆盖百度、必应等搜索) AI绘画整合包下载、Stable Diffusion整合包、ComfyUI整合包、秋葉aaaki整合包、AI绘图工具、AI绘画模型、

深入解析OpenClaw Skills:从原理到实战,打造专属机器人技能

深入解析OpenClaw Skills:从原理到实战,打造专属机器人技能

一、OpenClaw Skills:机器人行为的“最小执行单元” 1.1 什么是OpenClaw Skills? OpenClaw是面向开源机械爪/小型机器人的控制框架(核心仓库:openclaw/openclaw),旨在降低机器人行为开发的门槛。而Skills(技能) 是OpenClaw框架中对机器人“单一可执行行为”的封装模块——它将机器人完成某一特定动作的逻辑(如“夹取物体”“释放物体”“移动到指定坐标”)抽象为独立、可复用、可组合的代码单元。 简单来说: * 粒度:一个Skill对应一个“原子行为”(如“单指闭合”)或“组合行为”(如“夹取→移动→释放”); * 特性:跨硬件兼容(适配不同型号机械爪)、可插拔(直接集成到OpenClaw主框架)、可扩展(支持自定义参数); * 核心价值:避免重复开发,让开发者聚焦“

Qwen-Image-2512 V2版 - 细节拉满,更真实的AI绘画体验 ComfyUI+WebUI 一键整合包下载

Qwen-Image-2512 V2版 - 细节拉满,更真实的AI绘画体验 ComfyUI+WebUI 一键整合包下载

Qwen-Image-2512 是 Qwen-Image 文生图基础模型的 12 月更新版本,这是一个最新的文本生成图像模型,特点是 画面更真实、细节更精致,提升了人物与自然细节的真实感,适合在创意设计、教育展示、内容生产等领域使用。 今天分享的 Qwen-Image-2512 V2版 一键包基于阿里最新开源的 Qwen-Image-2512 的FP8量化版(同时支持BF16),支持消费级显卡最低12G显存流畅运行,支持更适合小白操作的WebUI模式和专业选手的ComfyUI两种模式。 相比较上个版本,V2版因使用精度更高的FP8模型,所以在生成效果上更好,同时对硬件的要求也更高,大家根据需要选择适合自己的版本。 下载地址:点此下载   模型特点 更真实的人物表现:相比旧版本,人物的面部细节、表情和环境都更自然,不再有明显的“AI感”。   更精细的自然细节:风景、动物毛发、水流等元素渲染更逼真,层次感更强。   更准确的文字渲染:在生成带文字的图像(如海报、PPT)时,排版和字体更清晰,图文融合更好。   更强的整体性能:

web APIS Day1

web APIS Day1

有关变量的声明 变量的声明有几种方式,例如用let,const。在以前的版本还用var来声明 var的特点:1、允许重复声明  2、存在变量提升,即变量可以再声明前使用 缺点:1、var 声明的变量会被提升到函数或全局作用域的顶部,导致变量在声明前就可以访问,但值为 undefined。这种行为容易引发逻辑错误             2、var 的作用域仅限于函数或全局,而非块级(如 if、for 等)。这会导致变量在块外仍可访问,可能引发意外覆盖 let的特点:1、不允许重复声明  2、不存在变量提升,必须先声明后使用 const的特点:1、必须初始化赋值  2、块级作用域  3。适合用于声明不可变的常量或引用类型 在此推荐使用const来声明变量,可以避免意外修改,或者使用let,var不推荐使用 DOM树和DOM对象 获取DOM元素 在CSS中我们一般使用document.querySelector(