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

Fix: add missing 'seed' attribute to llama_context_params initialization #1845

Closed

Conversation

sergey21000
Copy link

Fixes #1769

Add missing seed attribute initialization to context_params in Llama class. This resolves the AttributeError that occurs when trying to deepcopy the Llama model or use it with Gradio's State component.

Previously context_params.seed was not initialized, causing:
AttributeError: 'llama_context_params' object has no attribute 'seed'

@abetlen
Copy link
Owner

abetlen commented Dec 6, 2024

@sergey21000 thank you for raising this issue, I've fixed the issue in main, the seed parameter was removed from llama.cpp so the actual value is stored in Llama._seed atm. Thank you for tracking this down!

@abetlen abetlen closed this Dec 6, 2024
@sergey21000 sergey21000 deleted the fix/missing-seed-attribute branch December 8, 2024 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when passing model to deepcopy in llama_cpp_python>=0.3.0
2 participants