【求助】使用免费GPU计算实例尝试模型库中的大模型,报错:无法利用GPU,找不到模型文件

简介: 开启了免费GPU计算实例,但是报错。

开启了如下GPU的实例:
image.png

运行如下代码:

from modelscope import AutoModelForCausalLM, AutoTokenizer
import torch
torch.manual_seed(0)

path = 'OpenBMB/MiniCPM-2B-dpo-bf16'
tokenizer = AutoTokenizer.from_pretrained(path)
model = AutoModelForCausalLM.from_pretrained(path, torch_dtype=torch.bfloat16, device_map='cuda', trust_remote_code=True)

responds, history = model.chat(tokenizer, "山东省最高的山是哪座山, 它比黄山高还是矮?差距多少?", temperature=0.8, top_p=0.8)
print(responds)

得到如下执行日志:

2024-02-22 20:25:41,904 - modelscope - INFO - PyTorch version 2.1.2+cu121 Found.
2024-02-22 20:25:41,907 - modelscope - INFO - TensorFlow version 2.14.0 Found.
2024-02-22 20:25:41,909 - modelscope - INFO - Loading ast index from /mnt/workspace/.cache/modelscope/ast_indexer
2024-02-22 20:25:41,909 - modelscope - INFO - No valid ast index found from /mnt/workspace/.cache/modelscope/ast_indexer, generating ast index from prebuilt!
2024-02-22 20:25:41,967 - modelscope - INFO - Loading done! Current index file version is 1.12.0, with md5 509123dba36c5e70a95f6780df348471 and a total number of 964 components indexed
/opt/conda/lib/python3.10/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
  from .autonotebook import tqdm as notebook_tqdm
2024-02-22 20:25:43.223187: I tensorflow/core/util/port.cc:111] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.
2024-02-22 20:25:43.225595: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2024-02-22 20:25:43.263147: E tensorflow/compiler/xla/stream_executor/cuda/cuda_dnn.cc:9342] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-02-22 20:25:43.263200: E tensorflow/compiler/xla/stream_executor/cuda/cuda_fft.cc:609] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-02-22 20:25:43.263228: E tensorflow/compiler/xla/stream_executor/cuda/cuda_blas.cc:1518] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-02-22 20:25:43.271228: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
2024-02-22 20:25:43.271779: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 AVX512F AVX512_VNNI FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-02-22 20:25:44.177266: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Downloading: 100%|██████████| 0.99k/0.99k [00:00<00:00, 4.45MB/s]
Downloading: 100%|██████████| 9.54k/9.54k [00:00<00:00, 31.0MB/s]
Downloading: 100%|██████████| 113/113 [00:00<00:00, 1.00MB/s]
Downloading: 100%|██████████| 66.3k/66.3k [00:00<00:00, 8.84MB/s]
Downloading: 100%|██████████| 11.3k/11.3k [00:00<00:00, 36.5MB/s]
Downloading: 100%|██████████| 414/414 [00:00<00:00, 3.11MB/s]
Downloading: 100%|██████████| 5.92M/5.92M [00:00<00:00, 39.3MB/s]
Downloading: 100%|██████████| 1.90M/1.90M [00:00<00:00, 128MB/s]
Downloading: 100%|██████████| 1.11k/1.11k [00:00<00:00, 6.25MB/s]
2024-02-22 20:25:49,918 - modelscope - WARNING - Download interval is too small, use local cache
OSError: Error no file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory /mnt/workspace/.cache/modelscope/OpenBMB/MiniCPM-2B-dpo-bf16.

其中有两个错误:

  • 2024-02-22 20:25:43.271228: I tensorflow/tsl/cuda/cudart_stub.cc:28] Could not find cuda drivers on your machine, GPU will not be used.
  • OSError: Error no file named pytorch_model.bin, tf_model.h5, model.ckpt.index or flax_model.msgpack found in directory /mnt/workspace/.cache/modelscope/OpenBMB/MiniCPM-2B-dpo-bf16.
相关实践学习
在云上部署ChatGLM2-6B大模型(GPU版)
ChatGLM2-6B是由智谱AI及清华KEG实验室于2023年6月发布的中英双语对话开源大模型。通过本实验,可以学习如何配置AIGC开发环境,如何部署ChatGLM2-6B大模型。
相关文章
|
10月前
|
存储 人工智能 弹性计算
阿里云gpu云服务器收费价格,热门实例简介和最新按量、1个月、1年收费标准参考
在阿里云所有gpu云服务器实例规格中,计算型gn5、gn6i、gn6v、gn7i和最新推出的gn8is、gn8v-tee等实例规格是其中比较热门的gpu云服务器实例。阿里云gpu云服务器最新租用价格参考,适合AI推理/训练的16核60G+1张A10 24G显存(gn7i-c16g1.4xlarge),按量优惠价1.9/小时起。本文为大家展示阿里云gpu云服务器中gn5、gn6i等热门实例规格的主要性能和适用场景以及最新按量和1个月、1年收费标准,以供参考。
|
人工智能 Linux iOS开发
exo:22.1K Star!一个能让任何人利用日常设备构建AI集群的强大工具,组成一个虚拟GPU在多台设备上并行运行模型
exo 是一款由 exo labs 维护的开源项目,能够让你利用家中的日常设备(如 iPhone、iPad、Android、Mac 和 Linux)构建强大的 AI 集群,支持多种大模型和分布式推理。
4514 101
|
存储 测试技术 对象存储
容器计算服务ACS单张GPU即可快速搭建QwQ-32B推理模型
阿里云最新发布的QwQ-32B模型拥有320亿参数,通过强化学习大幅度提升了模型推理能力,其性能与DeepSeek-R1 671B媲美,本文介绍如何使用ACS算力部署生产可用的QwQ-32B模型推理服务。
|
人工智能 自然语言处理 API
Proxy Lite:仅3B参数的开源视觉模型!快速实现网页自动化,支持在消费级GPU上运行
Proxy Lite 是一款开源的轻量级视觉语言模型,支持自动化网页任务,能够像人类一样操作浏览器,完成网页交互、数据抓取、表单填写等重复性工作,显著降低自动化成本。
1237 11
Proxy Lite:仅3B参数的开源视觉模型!快速实现网页自动化,支持在消费级GPU上运行
|
存储 人工智能 算法
Magic 1-For-1:北大联合英伟达推出的高质量视频生成量化模型,支持在消费级GPU上快速生成
北京大学、Hedra Inc. 和 Nvidia 联合推出的 Magic 1-For-1 模型,优化内存消耗和推理延迟,快速生成高质量视频片段。
796 3
Magic 1-For-1:北大联合英伟达推出的高质量视频生成量化模型,支持在消费级GPU上快速生成
|
存储 人工智能 固态存储
轻量级AI革命:无需GPU就能运算的DeepSeek-R1-1.5B模型及其低配部署指南
随着AI技术发展,大语言模型成为产业智能化的关键工具。DeepSeek系列模型以其创新架构和高效性能备受关注,其中R1-1.5B作为参数量最小的版本,适合资源受限场景。其部署仅需4核CPU、8GB RAM及15GB SSD,适用于移动对话、智能助手等任务。相比参数更大的R1-35B与R1-67B+,R1-1.5B成本低、效率高,支持数学计算、代码生成等多领域应用,是个人开发者和初创企业的理想选择。未来,DeepSeek有望推出更多小型化模型,拓展低资源设备的AI生态。
3353 8
|
存储 文件存储 对象存储
AI 场景下,函数计算 GPU 实例模型存储最佳实践
当前,函数计算 FC 已被广泛应用在各种 AI 场景下,函数计算支持通过使用容器镜像部署 AI 推理应用,并且提供多种选项来访问训练好的模型。为了帮助开发者高效地在函数计算上部署 AI 推理应用,并快速解决不同场景下的模型存储选型问题,本文将对函数计算的 GPU 模型存储的优缺点及适用场景进行对比分析,以期为您的模型存储决策提供帮助。
|
存储 文件存储 对象存储
AI 场景下,函数计算 GPU 实例模型存储最佳实践
AI 场景下,函数计算 GPU 实例模型存储最佳实践
452 0
|
机器学习/深度学习 存储 人工智能
阿里云GPU云服务器实例规格gn6v、gn7i、gn6i实例性能及区别和选择参考
阿里云的GPU云服务器产品线在深度学习、科学计算、图形渲染等多个领域展现出强大的计算能力和广泛的应用价值。本文将详细介绍阿里云GPU云服务器中的gn6v、gn7i、gn6i三个实例规格族的性能特点、区别及选择参考,帮助用户根据自身需求选择合适的GPU云服务器实例。
阿里云GPU云服务器实例规格gn6v、gn7i、gn6i实例性能及区别和选择参考
|
9月前
|
人工智能 算法 调度
阿里云ACK托管集群Pro版共享GPU调度操作指南
本文介绍在阿里云ACK托管集群Pro版中,如何通过共享GPU调度实现显存与算力的精细化分配,涵盖前提条件、使用限制、节点池配置及任务部署全流程,提升GPU资源利用率,适用于AI训练与推理场景。
721 1

热门文章

最新文章