Comments (4)
gradio 的文件映射由 tempfile._TemporaryFileWrapper 实现,
请在shell中尝试:
> python
import tempfile
tempfile.gettempdir()
预期输出为
/tmp/
你可以选择在代码中加入:
tempfile.tempdir = "./tmp"
来临时将 tempfile 制定到项目根目录,或者其他你有权限的位置
from visualglm-6b.
tempfile.tempdir = "./tmp"
你好,我用了你说的方法,但是一直报FileNotFoundError,创建了文件夹后又报新的: FileNotFoundError [Errno 2] No such file or directory: './tmp/tmpg4o6naoc'
from visualglm-6b.
非常棒,你的办法有效,感谢你的解答
from visualglm-6b.
tempfile.tempdir = "./tmp"你好,我用了你说的方法,但是一直报FileNotFoundError,创建了文件夹后又报新的: FileNotFoundError [Errno 2] No such file or directory: './tmp/tmpg4o6naoc'
from transformers import AutoModel, AutoTokenizer
import gradio as gr
import mdtex2html
import tempfile
import os
os.makedirs("./tmp", exist_ok=True)
tempfile.tempdir = "./tmp"
tokenizer = AutoTokenizer.from_pretrained("model/chatglm-6b", trust_remote_code=True)
model = AutoModel.from_pretrained("model/chatglm-6b", trust_remote_code=True).half().cuda()
model = model.eval()
这样试试呢
from visualglm-6b.
Related Issues (20)
- 全代码开源会有吗
- 运行finetune代码时,报错没有model_config.json
- 报错cannot import name 'builder' from 'google.protobuf.internal'
- visualglm进行QLoRA微调时报错,RuntimeError: mat1 and mat2 shapes cannot be multiplied (320x4096 and 1x25165824) [2024-03-07 07:26:17,037] [INFO] [launch.py:316:sigkill_handler] Killing subprocess 13210 HOT 5
- 请问怎么把finetune后的模型转成onnx格式呢?
- 微调之后加载web_demo时的报错 HOT 2
- 请问在阿里云上部署,连接不上huggingface网站的问题怎么解决呀? HOT 6
- 关于只用文本数据集微调
- Lora微调报错,fp16 is not supported HOT 1
- 请问可以实现用qlora+model parallel 吗 HOT 1
- qlora merge lora weights error
- 多图推理
- python web_demo.py报错 HOT 1
- 运行web_demo_hf.py报错
- finetune的时候出现模型加载失败
- finetune的时候加载模型失败
- 'Chatbot' object has no attribute 'style'
- 关于纯文本微调
- 请问使用qlora微调时,出现TypeError: string indices must be integers,如何解决?
- Teste
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from visualglm-6b.