Giter Site home page Giter Site logo

Comments (4)

wzr1337 avatar wzr1337 commented on August 16, 2024

I just checked the Lambda that I pulled the log from and its timeout is set to 15 min, so it should not be the issue

from generative-ai-application-builder-on-aws.

wzr1337 avatar wzr1337 commented on August 16, 2024

I changed the deployment settings to NOT use streaming and I get the same result: Corrupted response ending in the middle of the response.

I also tried Claude V2 and V2.1, both have the same issue

from generative-ai-application-builder-on-aws.

wzr1337 avatar wzr1337 commented on August 16, 2024

I seem to have found the issue.. It is a too tighly set max_tokens_to_sample based on DEFAULT_MAX_TOKENS_TO_SAMPLE by changing it to 4096 the response does not get canceled anymore

from generative-ai-application-builder-on-aws.

ihmaws avatar ihmaws commented on August 16, 2024

Hi @wzr1337, thanks for the report and for taking the time to work through a detailed analysis of the issue.

As you've identified, many LLMs come with the ability to truncate/cap the number of output tokens generated. One of the primary things this helps to do is control costs by providing an upper bound on the number of output tokens generated by the model (output tokens are substantially more costly than input tokens).

For the anthropic family of models this can be controlled by a model parameter called max_tokens_to_sample (for their text completion API).

At the time this integration was first built, the default value for this parameter used by Anthropic's API was 256, so we chose to match this. This may have changed since the first release, so we will have a look and reassess for our next release.

That being said, the solution allows for customers to override any of the default model parameters and provide their own. You can do this at deployment time by setting an advanced model parameter at the model selection step (see example screenshot below). The parameters supported depends on the specific model used, so consult the model documentation.

Adding Advanced Parameters:

image

from generative-ai-application-builder-on-aws.

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.