-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Differences in template application #127
Comments
I've solved it by adding
(this issue can now be closed) |
That was a great investigation! |
You do realize that code is from Wllama right? :-D wllama/examples/main/src/utils/utils.ts Line 42 in ffcd98a
|
Hmm, right, the object inside In typescript, we can also force checking the type using bos_token: await window.llama_cpp_app.detokenize([window.llama_cpp_app.getBOS()]) satisfies string, |
After switching to the Jinja templating engine, I got the feeling that my default model (Danube 3 500m) wasn't giving the same answers.
So I did a test between the old and new version, and to my surprise there is a difference:
Transformers.js:
Jinja:
I then tried to use their latest Q4_K_M .gguf supplied by h2o.ai (for jinja) and also set their repo's latest config files (for Transformers.js). The result was the same.
I then compared the template that's embedded in the .gguf with the one in the config files. They were the same:
I then dove into the jinja template code, and realised I had noticed something odd earlier -
[object Map]
in the generated template - and had added some code to filter that out:Is the example code (from utils.js) I was using correct?
The text was updated successfully, but these errors were encountered: