Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] ollama options add num_ctx if custom model maxToken is set. #2865

Open
bingoct opened this issue Jun 13, 2024 · 1 comment
Open
Labels
🌠 Feature Request New feature or request | 特性与建议 Inactive No response in 30 days | 超过 30 天未活跃 ollama Relative to Ollama Provider and ollama models

Comments

@bingoct
Copy link

bingoct commented Jun 13, 2024

🥰 Feature Description

Need a way to set n_ctx by custom. num_ctx is 2048 length in default.

As #1244 define the CUSTOM_MODELS type. Infact the describtion of maxToken is close to usage of num_ctx.

Or Maybe use another variable?

🧐 Proposed Solution

const response = await this.client.chat({

maybe if model.tokens exist ,then options add item n_ctx: model.tokens

📝 Additional Information

https://github.com/ollama/ollama/blob/main/docs/modelfile.md#valid-parameters-and-values
https://github.com/ollama/ollama/blob/main/docs/faq.md#how-can-i-specify-the-context-window-size

@bingoct bingoct added the 🌠 Feature Request New feature or request | 特性与建议 label Jun 13, 2024
@lobehubbot
Copy link
Member

👀 @bingoct

Thank you for raising an issue. We will investigate into the matter and get back to you as soon as possible.
Please make sure you have given us as much context as possible.
非常感谢您提交 issue。我们会尽快调查此事,并尽快回复您。 请确保您已经提供了尽可能多的背景信息。

@bingoct bingoct changed the title [Request] ollama options andd num_ctx if custom model maxToken is set. [Request] ollama options add num_ctx if custom model maxToken is set. Jun 13, 2024
@lobehubbot lobehubbot added the Inactive No response in 30 days | 超过 30 天未活跃 label Aug 13, 2024
@arvinxx arvinxx added the ollama Relative to Ollama Provider and ollama models label Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🌠 Feature Request New feature or request | 特性与建议 Inactive No response in 30 days | 超过 30 天未活跃 ollama Relative to Ollama Provider and ollama models
Projects
None yet
Development

No branches or pull requests

3 participants