Skip to content

Commit 3e4eb53

Browse files
replaced_lambda_function
1 parent cc798b2 commit 3e4eb53

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

flash_rl/flash_quantization.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,20 @@ def flash_quantize_fp8_tensor(weights, profile):
115115
else:
116116
yield (name, tensor)
117117

118+
def flash_noquantize(weights, profile):
119+
logger.debug("flash_rl quantization is called")
120+
for name, tensor in weights:
121+
yield (name, tensor)
122+
118123
quant_fn_map = {
119124
'int8': flash_quantize,
120125
'int8_fast': flash_quantize,
121126
'int8_wo_prune': flash_quantize,
122127
'int8_prune': flash_quantize_with_prune,
123-
'fp8': lambda weights, profile: weights,
124-
'fp8_vllm': lambda weights, profile: weights,
125-
'fp8_fast': lambda weights, profile: weights,
126-
'fp8_vllm_fast': lambda weights, profile: weights,
128+
'fp8': flash_noquantize,
129+
'fp8_vllm': flash_noquantize,
130+
'fp8_fast': flash_noquantize,
131+
'fp8_vllm_fast': flash_noquantize,
127132
'fp8_tensor': flash_quantize_fp8_tensor,
128133
'fp8_channel': flash_quantize_fp8_channel,
129134
}

0 commit comments

Comments
 (0)