GithubHelp home page GithubHelp logo

Comments (11)

dluc avatar dluc commented on September 26, 2024 1

@martindevans I looked at the fix, and if I understand correctly \n is 3 tokens, could you confirm?

Until the bugfix is released, I'll hard code this edge case in Kernel Memory (which is using 0.9.1) to avoid exceptions.

from llamasharp.

aletfa avatar aletfa commented on September 26, 2024 1

https://github.com/aletfa/doctalk @martindevans TY.

from llamasharp.

martindevans avatar martindevans commented on September 26, 2024

Thanks for reporting this, I've reproduced it in a test and made some adjustments to the tokenizer which should fix it.

from llamasharp.

dluc avatar dluc commented on September 26, 2024

Btw in 0.9.1 the exception occurs also with these strings:

  • \t
  • \t\t
  • \t\t\t
  • ......
  • \n\n
  • \n\n\n
  • \n\n\n\n
  • ....
  • \t\n
  • \t\n\t\n\n\n\n\t\t
  • ....
  • \b
  • \v
  • \0

from llamasharp.

martindevans avatar martindevans commented on September 26, 2024

Thanks for those examples, I've just added a unit test covering them (it passes, so it looks like the fix works).

if I understand correctly \n is 3 tokens

It's actually:

  • 1: Beginning of string token
  • 29871: A space (llama.cpp tokenizer really likes to add a space at the start)
  • 13: The actual newline token

from llamasharp.

vvdb-architecture avatar vvdb-architecture commented on September 26, 2024

Another one is \nk.

from llamasharp.

martindevans avatar martindevans commented on September 26, 2024

All of these should be fixed by the changes currently in master :)

from llamasharp.

aletfa avatar aletfa commented on September 26, 2024

When a new Nuget package will be released with these fixes?

from llamasharp.

martindevans avatar martindevans commented on September 26, 2024

Very soon, it's been held up by some other OpenCL related changes. I hope by the end of this week.

from llamasharp.

aletfa avatar aletfa commented on September 26, 2024

I confirm that the fix resolves all the problems. TY. I'll wait for the next week.

from llamasharp.

martindevans avatar martindevans commented on September 26, 2024

I jsut released 0.10.0 with these changes :)

from llamasharp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.