Comments (5)
#1621 The fix is here
from ctranslate2.
Any updates, I am facing the same problem!
from ctranslate2.
The model accepts vocab size 32000 tokens but when getting tokens, tokenizer
get 32000 tokens + 1 token defined in added_tokens.json
. This is the cause of the mismatch in the size. I don't know why with a token added, the vocab size in the config is always 32000. There is some quick fix could be done by ignoring the added token but maybe lead the the quality of model.
from ctranslate2.
@minhthuc2502 It works, thanks!
This change needs to be done for the Mistral config as well. You can also add a warning message and print the token that is going to be truncated. In my case, it is a <sep>
token.
from ctranslate2.
Thanks for reminding me. Theses models are fine tuned from Llama, so I think the fix on Llama is enough. If there are any model based on Mistral, feel free to open the new issue.
from ctranslate2.
Related Issues (20)
- Problem with GPU allocation after updating to CTranslate2 4.0.0 HOT 1
- [INFO] cuDNN with fusions HOT 1
- Whisper models no longer work on Windows cuda after CTranslate2 4.0.0 HOT 2
- Intel Advanced Matrix Extensions (AMX) support HOT 1
- System error while converting Aya101 HOT 4
- Update the pip package HOT 1
- PROBLEM converting phi2, phi1.5, and phi1 models HOT 8
- Translator.unload_model(to_cpu=True) takes long time HOT 8
- `translate_iterable` is not properly handling `max_input_length` HOT 2
- Whisper batch generation is not faster than loops HOT 5
- Support for Zephyr and other "StableLmForCausalLM" models? HOT 2
- Benchmarking common LLMs on ctranslate2, llama.cpp, and bitsandbytes HOT 1
- Deploying with model and tensor parallelism HOT 4
- When building from source missing C++ libraries HOT 6
- int8 quantization not working HOT 1
- I try to pytest but it complains that "AttributeError: module 'ctranslate2' has no attribute 'get_cuda_device_count'" HOT 5
- Error when converting NMT model with ALiBi or RoPe HOT 15
- [Gemma] GELU should be approx tanh not exact HOT 2
- Asking about the return_scores during generation HOT 7
- 4.2.0 release build for python 3.9 HOT 13
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 ctranslate2.