Comments (8)
I had the same problem as you guys, so I reasoned reedcli meant with https://huggingface.co/01-ai/Yi-6B/discussions/6 they expected us to apply "trust_remote_code" to both instantiations.
So this code worked like a charm, please try it out:
from transformers import AutoTokenizer, AutoModelForCausalLM
model_path = '/path/to/your/model'
model = AutoModelForCausalLM.from_pretrained(model_path, trust_remote_code=True, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True, dtype="bfloat16", use_accelerate=True)
P.S.: (Add/replace your "device" snippet, I use mine).
from yi.
@mallorbc Thanks for your reply! I already set it to True (I even tried hard-coding "True" for "trust_remote_code"
from yi.
Is there any way to fix this in text-generation-webui-main for ExLlama_HF? What and where should I edit and add?
You need to launch the web UI with the --trust-remote-code
flag (it is disabled by default as a security measure).
from yi.
Unfortunately I can't reproduce this problem, maybe you can have a try with our Docker image (will be released soon: #3)
from yi.
I did a deep dive into the code ---- I think this problem might be caused by loading errors in this code: [https://github.com/huggingface/transformers/blob/eef7ea98c31a333bacdc7ae7a2372bde772be8e4/src/transformers/models/auto/tokenization_auto.py] . I downloaded the Yi-34b tar file, decompressed it, and used that dir as the pretrained path.
In tokenizer_config.json:
"auto_map": {
--
| "AutoTokenizer": ["tokenization_yi.YiTokenizer", null]
| },
Perhaps it failed to find the YiTokenizer class?
from yi.
Run with "trust_remote_code" being set to True
from yi.
Hello! i'm receiving the same error, i also tried trust_remote_code to True and receive same error.
from yi.
Is there any way to fix this in text-generation-webui-main for ExLlama_HF? What and where should I edit and add?
from yi.
Related Issues (20)
- 偶发性的会报错
- v100显卡,加载量化模型Yi-34B-Chat-4bits,推理速度很慢 HOT 7
- Features : openai_api.py support multi turn dialogs. HOT 1
- Result of Yi-6B-Chat on the BBH dataset cannot be reproduced HOT 1
- Yi-VL-34b支持int4量化吗?怎么操作 HOT 2
- 自定义数据train.jsonl 8万多,eval.jsonl 105条,为什么SFT时候只显示 length of train dataset:2852,length of eval dataset: 9 HOT 1
- When the API is called multiple times, the GPU memory continuously increases until it overflows. HOT 1
- LLama3发表了,啥时候Yi出新版本啊 HOT 2
- RuntimeError: "triu_tril_cuda_template" not implemented for 'BFloat16'” HOT 4
- Test issue bot
- Test issue bot
- where can I find the training code or script for YI-VL HOT 1
- lora微调yi-6b-chat之后,生成的结果会出现大量的换行符以及空格 HOT 4
- YI:9b在长上下下回答异常 HOT 5
- 用自己的数据集微调时会出现下面的报错,但是用官方的yi_example数据集就不会出现报错,请问这是为什么? HOT 1
- 请问有Yi-VL可以实现few-shot(in-context)数据的推理或微调吗? HOT 1
- Let's Build Yi Cookbook Together - Your Ideas Matter! HOT 4
- 拉了一个多模态大模型技术交流群,大家可以加入进来进行技术交流
- 📝 Yi 周边设计集思广益 HOT 1
- 🧠 Yi Merchandise Design Brainstorming!!! 🚀
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 yi.