Skip to content

Commit

Permalink
remove unnecessary print and codes
Browse files Browse the repository at this point in the history
  • Loading branch information
kakao-kevin-us committed Oct 25, 2024
1 parent eabb801 commit 325b352
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
4 changes: 1 addition & 3 deletions tests/models/decoder_only/language/test_cls_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,13 @@
import pytest
import torch

from ...utils import check_logprobs_close, check_outputs_equal

CLASSIFICATION_MODELS = [
"jason9693/Qwen2.5-1.5B-apeach"
]


@pytest.mark.parametrize("model", CLASSIFICATION_MODELS)
@pytest.mark.parametrize("dtype", ["bfloat16"])
@pytest.mark.parametrize("dtype", ["float"])
def test_classification_models(
hf_runner,
vllm_runner,
Expand Down
5 changes: 0 additions & 5 deletions vllm/model_executor/models/qwen2_cls.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ def __init__(
self.lora_config = lora_config

self.quant_config = quant_config
print(f"config: {config}\ncache_config: {cache_config}\nquant_config: {quant_config}")
self.model = Qwen2Model(config, cache_config, quant_config)

self.score = RowParallelLinear(config.hidden_size,
Expand All @@ -101,11 +100,9 @@ def forward(
attn_metadata: AttentionMetadata,
intermediate_tensors: Optional[IntermediateTensors] = None,
) -> torch.Tensor:
print(f"{input_ids}\n{positions}\n{kv_caches}\n{attn_metadata}\n{intermediate_tensors}")
hidden_states = self.model(input_ids, positions, kv_caches,
attn_metadata, intermediate_tensors)
logits, _ = self.score(hidden_states)
print(logits)
return logits

def pooler(
Expand Down Expand Up @@ -137,7 +134,6 @@ def load_weights(self, weights: Iterable[Tuple[str, torch.Tensor]]):
name = name.replace(weight_name, param_name)
# Skip loading extra bias for GPTQ models.
if name.endswith(".bias") and name not in params_dict:
print(f"bias is ignored: {name}")
continue
if is_pp_missing_parameter(name, self):
continue
Expand All @@ -148,7 +144,6 @@ def load_weights(self, weights: Iterable[Tuple[str, torch.Tensor]]):
else:
# Skip loading extra bias for GPTQ models.
if name.endswith(".bias") and name not in params_dict:
print(f"bias is ignored: {name}")
continue
# Remapping the name of FP8 kv-scale.
name = maybe_remap_kv_scale_name(name, params_dict)
Expand Down

0 comments on commit 325b352

Please sign in to comment.