Comments (19)
Could you please paste the characters that you typed here as text? I can't investigate the problem otherwise since I can't type those characters!
from llamasharp.
你好--你好。我今天能为?????????么? used the UTF-8 character set ;
from llamasharp.
你好--你好。我今天能为?????????么? used the UTF-8 character set ;
from llamasharp.
are u using Baichuan model?
from llamasharp.
uesd the ggml-vic13b-q5_1.bin
from llamasharp.
from llamasharp.
hello,are u fix this problem now?I meet the same problem. thx~
from llamasharp.
hello,are u fix this problem now?I meet the same problem. thx~
Some time ago I met a case that the response went wrong when Chinese and English mixed in the prompt but it was okay when using pure Chinese as prompt. Could you please change the prompt to have a try?
from llamasharp.
This should be fixed in LLamaSharp 0.7.0 for the StatelessExecutor
(only the stateless executor, the others need more work). Can you confirm if it's fixed for you?
from llamasharp.
InteractiveExecutor,I have the same problem, is there a solution
from llamasharp.
Unfortunately no, not yet. Someone needs to go in and modify the InteractiveExecutor to use the new StreamingTokenDecoder
.
from llamasharp.
I've located as the problem as GB2312
encoding. I'll fix it soon with a partial refactor of the executor with StreamingTokenDecoder
as Martin mentioned. And I'll appreciate for any help about it (next week I'll have some busy days). :)
from llamasharp.
PR #293 has just added the new decoder into the base executor. Can anyone here please pull the master branch and test if this is fixed with all executors now? Thanks.
from llamasharp.
PR #293 has just added the new decoder into the base executor. Can anyone here please pull the master branch and test if this is fixed with all executors now? Thanks.
I've tested yesterday but unfortunately it still doesn't work for Chinese. Windows uses GB2312
encoding by default for Chinese and we can get correct string by adding GB2312
to System.Text.Encoding
. However it seems the output of the model is totally a mess. I'm not sure it's because of the tokenizer or detokenizer but I prefer detokenizer to be blamed because the output are all meaningless Chinese, instead of other characters.
from llamasharp.
Ah ok, I thought it was the multi-token-single-character problem, but I guess not :(
from llamasharp.
The same problem still exists now, as Chinese characters are decomposed and combined into strange symbols:FlagAlpha-Llama2-Chinese-13b-Chat.Q2_K.gguf
from llamasharp.
Update: I've found a way to deal with Chinese decoding however still not robust. Please wait for a while and we'll include the fix in the next release. :)
from llamasharp.
This problem has been fixed with #326 and an example has been added. Could you please take a try with the master branch? Note that in our test, we found some Chinese model such as baichuan has a strange behaviour while others don't. If you're not sure which model to use, please consider llama2-chinese-alpaca.
from llamasharp.
Close this issue as completed, please feel free to reopen it if there's any problem.
from llamasharp.
Related Issues (20)
- CentOS x86_64 Failed Loading 'libllama.so' HOT 4
- System.TypeInitializationException: 'The type initializer for 'LLama.Native.NativeApi' threw an exception.' HOT 12
- How do I continously print the answer word for word when using document ingestion with kernel memory? HOT 1
- How to rebuild LLamaSharp backends HOT 2
- Namespace should be consistent
- Mamba HOT 10
- Android Backend HOT 2
- [Feature] Allow async model loading and cancellation
- [CI] Add more unit test to ensure the the outputs are reasonable HOT 3
- Take multiple chat templates into account
- [Feature]: Support for Function Calling or Tools HOT 4
- [BUG]: DefragThreshold default is not matching llama.cpp and probably not intended HOT 6
- [BUG]: Answer stop abruptly after contextsize, even with limiting prompt size HOT 1
- [BUG]: Linux cuda version detection could be incorrect HOT 2
- [BUG]: WSL2 has problem running LLamaSharp with cuda11
- Add unit test about long context HOT 2
- Add debug mode of LLamaSharp
- How to better provide system information for LLMs HOT 3
- LLAVA Configuration HOT 4
- [Feature]: 不同的LLM模型,代码要以怎样的方式融合到项目里 HOT 3
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 llamasharp.