Comments (5)
Happens to me too when I try to pack my application into exe through pyinstaller. Seems like module tiktoken_ext is unavailable after packaging.
I tried to add this module but I got another error: "FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\eddir\PycharmProjects\Deus\output\main\blobfile\VERSION'" .
PyInstaller args:
pyinstaller --noconfirm --onedir --windowed --collect-all "tiktoken_ext" "C:/Users/eddir/PycharmProjects/Deus/main.py"
Looks like the importing system for encoding is a little bit confuse.
from tiktoken.
This is not enough information to reproduce the problem. Could you run these commands and paste the full output:
python --version
python -c 'import platform; print(platform.platform())'
python -m venv env
source env/bin/activate
env/bin/python -m pip install wheel
env/bin/python -m pip install tiktoken
env/bin/python -c 'import tiktoken; print(tiktoken.get_encoding("gpt2"))'
env/bin/python -c 'import site; import os; print(os.listdir(site.getsitepackages()[0]))'
from tiktoken.
Thanks, there's another issue in which people are talking about pyinstaller: #43
If anyone has an issue that does not involve pyinstaller, please run the commands in #51 (comment) and paste the full log
from tiktoken.
OP hasn't responded, so closing. #43 is the right issue to talk about pyinstaller in
from tiktoken.
I am getting similar issue while loading the encoding:
The code snippet is as follows:
import tiktoken
from llama_index.callbacks import CallbackManager, TokenCountingHandler
enc = tiktoken.get_encoding("WhereIsAI/UAE-Large-V1")
token_counter = TokenCountingHandler(tokenizer= enc.encode)
and the error i am getting is as follows:
_---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
Cell In[20], line 3
1 import tiktoken
2 from llama_index.callbacks import CallbackManager, TokenCountingHandler
----> 3 enc = tiktoken.get_encoding("WhereIsAI/UAE-Large-V1")
4 token_counter = TokenCountingHandler(tokenizer= enc.encode)
File f:\pycharmprojects\llamaindex\venv\lib\site-packages\tiktoken\registry.py:68, in get_encoding(encoding_name)
65 assert ENCODING_CONSTRUCTORS is not None
67 if encoding_name not in ENCODING_CONSTRUCTORS:
---> 68 raise ValueError(
69 f"Unknown encoding {encoding_name}. Plugins found: {_available_plugin_modules()}"
70 )
72 constructor = ENCODING_CONSTRUCTORS[encoding_name]
73 enc = Encoding(**constructor())
ValueError: Unknown encoding WhereIsAI/UAE-Large-V1. Plugins found: ['tiktoken_ext.openai_public']_
from tiktoken.
Related Issues (20)
- Combining marks and indic vowel marks within words are being split breaking all indic languages and most languages except English and CJKs HOT 4
- I need tiktoken win32 python3.8 version, can anyone provide it? HOT 1
- A character is splited into two tokens HOT 1
- gpt-4o tokenizer HOT 1
- Or
- GPT4o出现低级bug:发现最新token中的垃圾语料及实测GPT4o胡言乱语出现幻觉 HOT 3
- `o200k_base` pretokenizer - regex error? HOT 2
- Tiktoken educational BPE trainer takes long time to train with vocab size 30k HOT 2
- tiktoken 0.7.0 isn't compatible with python 3.11.* HOT 3
- Unknown encoding gpt2 HOT 1
- I want to modify the code in self._core_bpe.decode_bytes(tokens).decode("utf-8", errors=errors) HOT 1
- TikToken Tokenizer from scratch ?
- Support for GPT 4o HOT 1
- [FR] Add `--offline` HOT 3
- Send from DWG FastView(Android)
- Bunu uygulamaya göre ayarla
- 请问大家现在tiktok 退出了tiktok coin?
- RecursionError: maximum recursion depth exceeded while calling a Python object
- A HOT 1
- U
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 tiktoken.