Skip to content

Parse seed for vLLM #602

New issue

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

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

Already on GitHub? # to your account

Merged
merged 3 commits into from
Apr 8, 2025
Merged

Parse seed for vLLM #602

merged 3 commits into from
Apr 8, 2025

Conversation

eldarkurtic
Copy link
Contributor

When seed is set through model_args, for example:

"pretrained=deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B,seed=123,dtype=bfloat16,max_model_length=38768,gpu_memory_utilization=0.8,tensor_parallel_size=1"

it is parsed as a string attribute in VLLMModelConfig, leading to an error during LLM initialization:

model = LLM(**self.model_args)

This PR ensures that seed is correctly cast to an integer before passing it to the model, preventing initialization errors.

When seed is set through model_args, for example:

```bash
"pretrained=deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B,seed=123,dtype=bfloat16,max_model_length=38768,gpu_memory_utilization=0.8,tensor_parallel_size=1"
``

it is parsed as a string attribute in `VLLMModelConfig`, leading to an error during LLM initialization:

```python
model = LLM(**self.model_args)
```

This PR ensures that seed is correctly cast to an integer before passing it to the model, preventing initialization errors.
@LHB-kk
Copy link

LHB-kk commented Mar 12, 2025

Same problem!

@HuggingFaceDocBuilderDev
Copy link
Collaborator

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@NathanHB NathanHB merged commit 9ea7d6a into huggingface:main Apr 8, 2025
4 checks passed
@NathanHB NathanHB added the bug Something isn't working label May 5, 2025
hynky1999 pushed a commit that referenced this pull request May 22, 2025
When seed is set through model_args, for example:

```bash
"pretrained=deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B,seed=123,dtype=bfloat16,max_model_length=38768,gpu_memory_utilization=0.8,tensor_parallel_size=1"
``

it is parsed as a string attribute in `VLLMModelConfig`, leading to an error during LLM initialization:

```python
model = LLM(**self.model_args)
```

This PR ensures that seed is correctly cast to an integer before passing it to the model, preventing initialization errors.

Co-authored-by: Nathan Habib <30601243+NathanHB@users.noreply.github.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants