Skip to content

Conversation

FoolPlayer
Copy link
Contributor

@FoolPlayer FoolPlayer commented Aug 20, 2025

Purpose

Add Seed-Oss model.
transformers see: huggingface/transformers#40272

Test Plan

Test Result

(Optional) Documentation Update


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

Signed-off-by: jiabin.00 <jiabin.00@bytedance.com>
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds support for the Seed-Oss model, including the model implementation, a tool parser, and necessary registry updates. The implementation looks mostly solid, but I've identified a few critical issues that should be addressed before merging. These include leftover debugging print statements, a security vulnerability from using eval() on model output, and silent error handling that could obscure bugs. I've provided specific suggestions for each of these points.

Comment on lines 188 to 192
param_value = eval(param_value)
except:
logger.warning(
f"Parsed value '{param_value}' of parameter '{param_name}' cannot be converted via Python `eval()` in tool '{func_name}', degenerating to string."
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Using eval() on model output is a significant security vulnerability. Model output is untrusted input and can be manipulated to execute arbitrary code on the server. Please replace eval() with ast.literal_eval and add import ast at the top of the file.

Suggested change
param_value = eval(param_value)
except:
logger.warning(
f"Parsed value '{param_value}' of parameter '{param_name}' cannot be converted via Python `eval()` in tool '{func_name}', degenerating to string."
)
param_value = ast.literal_eval(param_value)
except (ValueError, SyntaxError):
logger.warning(
f"Parsed value '{param_value}' of parameter '{param_name}' cannot be converted via Python `ast.literal_eval()` in tool '{func_name}', degenerating to string."
)

Comment on lines 192 to 193
print(architectures)
print(model_config)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

These print statements appear to be leftover debugging code. They should be removed before merging to avoid cluttering logs and potential performance degradation in production environments.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense

Comment on lines 488 to 489
except Exception:
pass # Ignore parsing errors during streaming
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Silently ignoring all exceptions with except Exception: pass is dangerous. It can hide bugs and make debugging very difficult. If an error occurs during argument parsing, it should at least be logged as a warning. This will help identify issues with model output or the parser logic itself.

                    except Exception:
                        logger.warning(
                            "Failed to parse tool arguments during streaming.",
                            exc_info=True)

Copy link

👋 Hi! Thank you for contributing to the vLLM project.

💬 Join our developer Slack at https://slack.vllm.ai to discuss your PR in #pr-reviews, coordinate on features in #feat- channels, or join special interest groups in #sig- channels.

Just a reminder: PRs would not trigger full CI run by default. Instead, it would only run fastcheck CI which starts running only a small and essential subset of CI tests to quickly catch errors. You can run other CI tests on top of those by going to your fastcheck build on Buildkite UI (linked in the PR checks section) and unblock them. If you do not have permission to unblock, ping simon-mo or khluu to add you in our Buildkite org.

Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging.

To run CI, PR reviewers can either: Add ready label to the PR or enable auto-merge.

🚀

@youkaichao
Copy link
Member

cc @DarkLight1337 who can help take a look?

return loaded_params


class SeedOssForCausalLM(nn.Module, SupportsLoRA, SupportsPP):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this model structure is consistent with llama. Can we directly inherit from llama, just like phi3 does?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We also need to update the supported_models and test

rf"{tool_start_re}(.*?){tool_end_re}|{tool_start_re}(.*?)$",
re.DOTALL)

# 其余 regex 与原版一致
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add comment in english

@@ -0,0 +1,632 @@
# SPDX-License-Identifier: Apache-2.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add test for this tool parser, see: https://github.com/vllm-project/vllm/tree/main/tests/tool_use

@ZJY0516
Copy link
Contributor

ZJY0516 commented Aug 21, 2025

Now that Seed-OSS is released, I was wondering if there's any progress on this PR.

@FoolPlayer
Copy link
Contributor Author

Now that Seed-OSS is released, I was wondering if there's any progress on this PR.

thanks for review, i'll fix the comments these days

Signed-off-by: jiabin.00 <jiabin.00@bytedance.com>
Signed-off-by: jiabin.00 <jiabin.00@bytedance.com>
@FoolPlayer FoolPlayer requested a review from hmellor as a code owner August 21, 2025 10:18
@mergify mergify bot added the documentation Improvements or additions to documentation label Aug 21, 2025
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
Copy link
Collaborator

@jeejeelee jeejeelee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already confirmed with @FoolPlayer, both the generation and tool calls are working fine, so I'm adding my stamp.
@FoolPlayer Thank you for contribuion

@jeejeelee jeejeelee added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 21, 2025
@jeejeelee jeejeelee enabled auto-merge (squash) August 21, 2025 16:05
@prnake
Copy link

prnake commented Aug 21, 2025

In addition to the documents and test files, the current PR is lacking some necessary elements, such as ReasoningParser.

The current PR does not handle the xml tags such as seed:think.

{"id":"chatcmpl-7f45361eec5e483c96a119683efdadd7","object":"chat.completion","created":1755792348,"model":"Seed-OSS-36B-Instruct","choices":[{"index":0,"message":{"role":"assistant","content":"<seed:think>\nGot it, let's see. The user wrote \"Ciallo\". First, I need to figure out what that means. \"Ciallo\" is a term I've heard before, maybe from Japanese or anime? Wait, let me think. Oh right, \"ciao\" is Italian for \"hello\" or \"goodbye\", but \"ciallo\"—maybe it's a misspelling or a different language. Wait, no, actually, in some anime or Japanese contexts, \"ciallo\" is sometimes used as a casual way to say \"hello\" or \"hi\", maybe influenced by \"ciao\"? Or is it a typo? Wait, let me check. Alternatively, maybe it's a name? Or a slang term. Wait, another angle: \"ciallo\" could be a transliteration of a Japanese sound or a term. Let me think... Oh, right! There's a character named Ciallo? Or maybe it's a fanservice term. Wait, no, actually, I remember that \"ciallo\" is sometimes used in online communities, especially among anime fans, as a friendly greeting, similar to \"hi\" or \"hello\". It might have originated from a mishearing or a playful twist on \"ciao\". Alternatively, could it be a typo for \"ciao\"? But the user wrote \"ciallo\" with two Ls. Let me confirm. Looking it up quickly in my mind: yes, \"ciallo\" is often used in casual, friendly contexts, especially in anime or otaku communities, as a way to say hello. So the user probably just said \"hello\" in a casual, maybe anime-influenced way. So the response should be friendly, acknowledging that. Maybe say \"Hi there! Ciallo is a cute greeting, right? How are you doing today?\" or something like that. Keep it warm and welcoming.</seed:think>Ciallo! It’s such a cheerful, friendly little greeting—often seen in casual anime or otaku circles, like a playful \"hi\" or \"hello.\"  \n\nHow are you feeling today? 😊","refusal":null,"annotations":null,"audio":null,"function_call":null,"tool_calls":[],"reasoning_content":null},"logprobs":null,"finish_reason":"stop","stop_reason":null}],"service_tier":null,"system_fingerprint":null,"usage":{"prompt_tokens":10,"total_tokens":441,"completion_tokens":431,"prompt_tokens_details":null},"prompt_logprobs":null,"kv_transfer_params":null}

Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
@jeejeelee jeejeelee merged commit 5964069 into vllm-project:main Aug 22, 2025
42 checks passed
Xu-Wenqing pushed a commit to Xu-Wenqing/vllm that referenced this pull request Aug 23, 2025
Signed-off-by: jiabin.00 <jiabin.00@bytedance.com>
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
Co-authored-by: Jee Jee Li <pandaleefree@gmail.com>
Signed-off-by: root <xwq391974@alibaba-inc.com>
epwalsh pushed a commit to epwalsh/vllm that referenced this pull request Aug 28, 2025
Signed-off-by: jiabin.00 <jiabin.00@bytedance.com>
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
Co-authored-by: Jee Jee Li <pandaleefree@gmail.com>
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 28, 2025
Signed-off-by: jiabin.00 <jiabin.00@bytedance.com>
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
Co-authored-by: Jee Jee Li <pandaleefree@gmail.com>
Signed-off-by: Xiao Yu <xiao.yu@amd.com>
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Aug 28, 2025
Signed-off-by: jiabin.00 <jiabin.00@bytedance.com>
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
Co-authored-by: Jee Jee Li <pandaleefree@gmail.com>
mengxingkongzhouhan pushed a commit to mengxingkongzhouhan/vllm that referenced this pull request Aug 30, 2025
Signed-off-by: jiabin.00 <jiabin.00@bytedance.com>
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
Co-authored-by: Jee Jee Li <pandaleefree@gmail.com>
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Sep 3, 2025
Signed-off-by: jiabin.00 <jiabin.00@bytedance.com>
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
Co-authored-by: Jee Jee Li <pandaleefree@gmail.com>
FeiDaLI pushed a commit to FeiDaLI/vllm that referenced this pull request Sep 25, 2025
Signed-off-by: jiabin.00 <jiabin.00@bytedance.com>
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
Co-authored-by: Jee Jee Li <pandaleefree@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation frontend new-model Requests to new models ready ONLY add when PR is ready to merge/full CI is needed tool-calling
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants