Skip to content

Conversation

sergey21000
Copy link
Contributor

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