Giter Site home page Giter Site logo

Support full token limits about developer HOT 6 OPEN

smol-ai avatar smol-ai commented on July 3, 2024
Support full token limits

from developer.

Comments (6)

IanCal avatar IanCal commented on July 3, 2024 1

Interesting - it's not an issue I've really hit since generally I'm trying to get a lot of output (more stuff per prompt = more bang for your buck). It could help explain why I'm getting less useful outputs from some things though, it doesn't have enough space to create the right hierarchies.

The question I guess is whether it will output needlessly large results. It definitely doesn't fill the full amount each time, broadly I've found gpt-4 to be quite good at doing just what it needs to.

in other words, if max token length is strictly always better, why would openai want us to reduce it down, ever?

TBF it's important when it comes to cost & more, particularly as the context size increases. 8k is a lot, if you really just need a short response it's good to be able to cap it.

from developer.

swyxio avatar swyxio commented on July 3, 2024

thank you! but quick followup - is it actually always a good thing to request the max token length? will it incentivize the model to hallucinate code it doesnt need? smol is better, no?

in other words, if max token length is strictly always better, why would openai want us to reduce it down, ever?

from developer.

djstunami avatar djstunami commented on July 3, 2024

Based on this discussion on the OpenAI community site, max token changes based on the model you're using and if you exceed the max token for a particular model, it will return a 400.

Not sure why they're having the API user set it, but there you go.

from developer.

swyxio avatar swyxio commented on July 3, 2024

yea i'm pretty sure choice of max token affects the output. shorter makes it try to end sooner. this is feature not a bug

from developer.

swyxio avatar swyxio commented on July 3, 2024

8k is a lot, if you really just need a short response it's good to be able to cap it.

yes but notice that the shortness of the requested tokens actually does somewhat affect the generated output - openai is doing something other than next token prediction, that shortens the answer when its about to go over (this is a weak effect, ive observed this rule been broken too, but ive definitely noticed it)

from developer.

csabag avatar csabag commented on July 3, 2024

yea i'm pretty sure choice of max token affects the output. shorter makes it try to end sooner. this is feature not a bug

I found this openai community thread reply:

I asked the support and they clarified that GPT-3 will not attempt to create shorter texts with a smaller max_tokens value. The text will indeed just be cut off. So in my case, I guess it makes sense to use a higher value to have more “wiggle room”.

On the other hand I can imagine that OpenAI might do some funky stuff in the background, e.g. prefixes your prompt with "Answer in {max_tokens*0.75} or less words." This would not do exactly that as it's been shown that the model is not THAT capable but it might influence the length.

from developer.

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.