Skip to content

Avner/sglang fa4 phnx - #9

Open
avnermay wants to merge 143 commits into
mainfrom
avner/sglang-fa4-phnx
Open

Avner/sglang fa4 phnx#9
avnermay wants to merge 143 commits into
mainfrom
avner/sglang-fa4-phnx

Conversation

@avnermay

@avnermay avnermay commented May 5, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

avnermay and others added 30 commits March 18, 2026 12:39
avnermay and others added 15 commits May 23, 2026 07:21
Strips Phoenix V1 support (PhoenixLlamaForCausalLM, use_phoenix config flag,
--phoenix CLI flags, PHOENIX_70B paths, use_eagle_or_phoenix abstraction,
phoenix-specific activation conditioning branches, mask_tensor loader skip).
Preserves all other improvements from avner/sglang-fa4-phnx.

The companion branch avner/sglang-fa4-phnx differs from this branch solely by
the phoenix code removed here.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread ssd/config.py
self.draft_hf_config = AutoConfig.from_pretrained(draft)
self.max_model_len = min(
self.max_model_len, self.draft_hf_config.max_position_embeddings)
self.draft_hf_config = AutoConfig.from_pretrained(draft, trust_remote_code=True)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Static Code Analysis Risk: Together python huggingface trust remote code

trust_remote_code=True downloads and executes arbitrary Python code from the model repository without sandboxing (OWASP LLM03:2025 Supply Chain). A malicious or compromised model repo can achieve RCE on every host that loads the model (CWE-94). Pin to a verified commit hash and audit remote code before use, or use models that don't require trust_remote_code.

Severity: High 🚨
Status: Open 🔴

References:

  1. https://cwe.mitre.org/data/definitions/94
  2. https://huggingface.co/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained
  3. https://genai.owasp.org/llmrisk/llm032025-supply-chain/
  4. https://hiddenlayer.com/research/weaponizing-machine-learning-models-with-ransomware/

Suggested reviewers 🧐: @avnermay

More details:

🌻 View in Arnica

If you see an issue, please contact Shasheen in the #security-engineering Slack channel.


Take action by replying with an [arnica] command 💬

Actions

Use [arnica] or [a] to interact with the Arnica bot to acknowledge or dismiss code risks.

To acknowledge the finding as a valid code risk: [arnica] ack <acknowledge additional details>

To dismiss the risk with a reason: [arnica] dismiss <fp|accept|capacity> <dismissal reason>

Examples

  • [arnica] ack This is a valid risk and I'm looking into it

  • [arnica] dismiss fp Dismissed - Risk Not Accurate: (i.e. False Positive)

  • [arnica] dismiss accept Dismiss - Risk Accepted: Allow the risk to exist in the system

  • [arnica] dismiss capacity Dismiss - No Capacity: This will need to wait for a future sprint

Comment thread ssd/config.py
self.max_model_len, self.hf_config.max_position_embeddings)
if self.speculate:
assert 1 <= self.num_gpus <= 8 # this codebase only works on one node
self.hf_config = AutoConfig.from_pretrained(model, trust_remote_code=True)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Static Code Analysis Risk: Together python huggingface trust remote code

trust_remote_code=True downloads and executes arbitrary Python code from the model repository without sandboxing (OWASP LLM03:2025 Supply Chain). A malicious or compromised model repo can achieve RCE on every host that loads the model (CWE-94). Pin to a verified commit hash and audit remote code before use, or use models that don't require trust_remote_code.

Severity: High 🚨
Status: Open 🔴

References:

  1. https://cwe.mitre.org/data/definitions/94
  2. https://huggingface.co/docs/transformers/main/en/main_classes/model#transformers.PreTrainedModel.from_pretrained
  3. https://genai.owasp.org/llmrisk/llm032025-supply-chain/
  4. https://hiddenlayer.com/research/weaponizing-machine-learning-models-with-ransomware/

Suggested reviewers 🧐: @avnermay

More details:

🌻 View in Arnica

If you see an issue, please contact Shasheen in the #security-engineering Slack channel.


Take action by replying with an [arnica] command 💬

Actions

Use [arnica] or [a] to interact with the Arnica bot to acknowledge or dismiss code risks.

To acknowledge the finding as a valid code risk: [arnica] ack <acknowledge additional details>

To dismiss the risk with a reason: [arnica] dismiss <fp|accept|capacity> <dismissal reason>

Examples

  • [arnica] ack This is a valid risk and I'm looking into it

  • [arnica] dismiss fp Dismissed - Risk Not Accurate: (i.e. False Positive)

  • [arnica] dismiss accept Dismiss - Risk Accepted: Allow the risk to exist in the system

  • [arnica] dismiss capacity Dismiss - No Capacity: This will need to wait for a future sprint

@avnermay
avnermay changed the base branch from main to avner/sglang-fa4 June 1, 2026 15:31
@avnermay
avnermay changed the base branch from avner/sglang-fa4 to main July 14, 2026 23:15
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.

1 participant