Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

fix: context length for model import #2043

Merged
merged 1 commit into from
Feb 27, 2025
Merged

Conversation

vansangpfiev
Copy link
Contributor

Describe Your Changes

This pull request includes several changes to the engine/config/gguf_parser.cc and engine/services/model_service.cc files to improve the handling of model configuration and metadata. The most important changes are grouped by theme below:

Code Simplification and Cleanup:

  • Moved the #include <filesystem> directive to the correct position in engine/config/gguf_parser.cc to maintain proper alphabetical order of includes.

Error Handling:

  • Reformatted the error message in the ReadString method to improve readability.

Model Configuration:

  • Simplified the assignment of max_tokens and ctx_len in the ModelConfigFromMetadata method to directly use max_tokens instead of applying a minimum function.
  • Added the assignment of max_tokens to the JSON data in the StartModel method to ensure it is included in the model configuration. [1] [2]

Fixes Issues

  • Closes #
  • Closes #

Self Checklist

  • Added relevant comments, esp in complex areas
  • Updated docs (for bug fixes / features)
  • Created issues for follow-up changes or refactoring needed

@vansangpfiev vansangpfiev merged commit ce1fbe0 into main Feb 27, 2025
8 checks passed
@vansangpfiev vansangpfiev deleted the s/fix/ctx-len-in-model-yml branch February 27, 2025 12:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants