Giter Site home page Giter Site logo

Comments (3)

Aedial avatar Aedial commented on August 27, 2024 1

Thanks for the answer! My problem is solved, I double checked the "preset" parameter in the api and the parameter in the web request and found the difference between them. Finally I found that it was the "repetition_penalty" that was affecting the output. I used to think it had no effect. When I set the "repetition_penalty" from the default "2.25" to "1.148125", the output text starts with The output text ends with a complete sentence.

Translated with www.DeepL.com/Translator (free version)

It seems there is an obscure scaling done on repetition penalty, adjusting the value following 0.525*(X - 1)/7 + 1 (with X previous rep pen - formula extracted from minified JavaScript code). Seems kind of weird for it to exist frontend-side and not backend-side.
A fix is coming along with new sanity tests checking compliancy instead of just "nothing is broken".

from novelai-api.

Aedial avatar Aedial commented on August 27, 2024

I see no bug here. Setting the generate_until_sentence to True does reflect on the request sent to the server when fed to the high_level.generate or high_level.generate_stream.
Note that it will continue sentence only if a period is actually found in the 20 tokens after the end. It means it is affected by context, preset, biases, bans, etc.
If you see an issue, it is likely incomplete copy of the settings on your side. For a deterministic comparison, set the top_k to 1 on both, and you should see the exact same content if both settings are the same.

from novelai-api.

cwyuu avatar cwyuu commented on August 27, 2024

I see no bug here. Setting the generate_until_sentence to True does reflect on the request sent to the server when fed to the high_level.generate or high_level.generate_stream. Note that it will continue sentence only if a period is actually found in the 20 tokens after the end. It means it is affected by context, preset, biases, bans, etc. If you see an issue, it is likely incomplete copy of the settings on your side. For a deterministic comparison, set the top_k to 1 on both, and you should see the exact same content if both settings are the same.

Thanks for the answer! My problem is solved, I double checked the "preset" parameter in the api and the parameter in the web request and found the difference between them. Finally I found that it was the "repetition_penalty" that was affecting the output. I used to think it had no effect. When I set the "repetition_penalty" from the default "2.25" to "1.148125", the output text starts with The output text ends with a complete sentence.

Translated with www.DeepL.com/Translator (free version)

from novelai-api.

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.