Exploit databaseDownload repository ZIP
GH-3e4507aa2dfab678631e56a68e29c690
gouldnicholas/cve-2026-7669-poc
Sources for CVE-2026-7669
1 sourcePreferred order: Exploit-DB, Metasploit, then GitHub repositories by stars.
Repository files176
gouldnicholas/cve-2026-7669-pocRevision 1cb1dd334443
- ↑..Parent directory
- deepseek_common/
- afmoe.py
- apertus.py
- arcee.py
- baichuan.py
- bailing_moe.py
- bailing_moe_linear.py
- bailing_moe_nextn.py
- bert.py
- chatglm.py
- clip.py
- commandr.py
- dbrx.py
- deepseek.py
- deepseek_janus_pro.py
- deepseek_nextn.py
- deepseek_ocr.py
- deepseek_v2.py
- deepseek_vl2.py
- dots_ocr.py
- dots_vlm.py
- dots_vlm_vit.py
- ernie4.py
- ernie45_moe_vl.py
- ernie45_vl.py
- ernie4_eagle.py
- exaone.py
- exaone4.py
- exaone_moe.py
- exaone_moe_mtp.py
- falcon_h1.py
- gemma.py
- gemma2.py
- gemma2_reward.py
- gemma3_causal.py
- gemma3_mm.py
- gemma3n_audio.py
- gemma3n_causal.py
- gemma3n_mm.py
- gemma4_audio.py
- gemma4_causal.py
- gemma4_mm.py
- gemma4_vision.py
- glm4.py
- glm4_moe.py
- glm4_moe_lite.py
- glm4_moe_nextn.py
- glm4v.py
- glm4v_moe.py
- glm_ocr.py
Files from this repository share one source choice. Supporting files may cover other vulnerabilities.
sglang_source/python/sglang/srt/models/internlm2_reward.py
Python · 2,522 bytes# Copyright 2023-2024 SGLang Team
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
from typing import Iterable, Optional, Tuple
import torch
from torch import nn
from transformers import PretrainedConfig
from sglang.srt.layers.pooler import EmbeddingPoolerOutput, Pooler, PoolingType
from sglang.srt.layers.quantization.base_config import QuantizationConfig
from sglang.srt.model_executor.forward_batch_info import ForwardBatch
from sglang.srt.models.internlm2 import InternLM2ForCausalLM, InternLM2Model
from sglang.srt.utils import add_prefix
class InternLM2ForRewardModel(nn.Module):
def __init__(
self,
config: PretrainedConfig,
quant_config: Optional[QuantizationConfig] = None,
prefix: str = "",
) -> None:
super().__init__()
self.config = config
self.quant_config = quant_config
self.vocab_size = config.vocab_size
self.model = InternLM2Model(
config, quant_config, prefix=add_prefix("model", prefix)
)
self.v_head = nn.Linear(config.hidden_size, 1, bias=False)
self.pooler = Pooler(pooling_type=PoolingType.LAST, normalize=False)
@torch.no_grad()
def forward(
self,
input_ids: torch.Tensor,
positions: torch.Tensor,
forward_batch: ForwardBatch,
input_embeds: torch.Tensor = None,
get_embedding: bool = True,
) -> EmbeddingPoolerOutput:
assert get_embedding, "InternLM2ForRewardModel is only used for embedding"
hidden_states = self.model(input_ids, positions, forward_batch, input_embeds)
last_token_hidden = self.pooler(hidden_states, forward_batch).embeddings
scores = self.v_head(last_token_hidden)
return EmbeddingPoolerOutput(scores)
def load_weights(self, weights: Iterable[Tuple[str, torch.Tensor]]):
return InternLM2ForCausalLM.load_weights(self, weights)
EntryClass = InternLM2ForRewardModel