From 325b352f8fddae20d3273b528a11ff5db0e17b10 Mon Sep 17 00:00:00 2001 From: kevin-us Date: Sat, 26 Oct 2024 01:57:46 +0900 Subject: [PATCH] remove unnecessary print and codes --- tests/models/decoder_only/language/test_cls_models.py | 4 +--- vllm/model_executor/models/qwen2_cls.py | 5 ----- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/models/decoder_only/language/test_cls_models.py b/tests/models/decoder_only/language/test_cls_models.py index f2dc3c3c..352f8a4e 100644 --- a/tests/models/decoder_only/language/test_cls_models.py +++ b/tests/models/decoder_only/language/test_cls_models.py @@ -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, diff --git a/vllm/model_executor/models/qwen2_cls.py b/vllm/model_executor/models/qwen2_cls.py index 5286b70b..84b5e72e 100644 --- a/vllm/model_executor/models/qwen2_cls.py +++ b/vllm/model_executor/models/qwen2_cls.py @@ -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, @@ -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( @@ -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 @@ -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)