Skip to content

Context length management #981

Answered by noelo
noelo asked this question in Q&A
Feb 6, 2025 · 2 comments · 1 reply
Discussion options

You must be logged in to vote

I managed to sort this out at the client level. The AgentConfig class has a max_tokens field in the sampling_params config.

    agent_config = AgentConfig(
        model=selected_model,
        sampling_params={"max_tokens":4096,
            "strategy": {"type": "top_p", "temperature": 1.0, "top_p": 0.9},
        },

I wonder if this should be something passed back by the framework, similar to the model name.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@noelo
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by noelo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants