mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 20:34:54 +00:00
Small fixes
This commit is contained in:
parent
3eb6c1ccf8
commit
05f98efc9d
@ -37,7 +37,9 @@ async def test_compressed_tensors_w8a8_int(
|
||||
assert response == response_snapshot
|
||||
|
||||
|
||||
@pytest.mark.release
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.private
|
||||
async def test_compressed_tensors_w8a8_int_all_params(
|
||||
compressed_tensors_w8a8_int, response_snapshot
|
||||
):
|
||||
|
@ -39,7 +39,9 @@ async def test_compressed_tensors_w8a8_int_dynamic_weight(
|
||||
assert response == response_snapshot
|
||||
|
||||
|
||||
@pytest.mark.release
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.private
|
||||
async def test_compressed_tensors_w8a8_int_dynamic_weight_all_params(
|
||||
compressed_tensors_w8a8_int_dynamic_weight, response_snapshot
|
||||
):
|
||||
|
@ -51,10 +51,10 @@ class W8A8IntLoader(WeightsLoader):
|
||||
def scale_to_str(scale):
|
||||
return "static" if scale else "dynamic"
|
||||
|
||||
def symmetric_to_string(symmetric):
|
||||
def symmetric_to_str(symmetric):
|
||||
return "symmetric" if symmetric else "asymmetric"
|
||||
|
||||
return f"{self.__class__.__name__} (w8a8 int, input: dynamic/{symmetric_to_string(self.input_symmetric)}, weight: {scale_to_str(self.load_weight_scale)}/symmetric))"
|
||||
return f"{self.__class__.__name__} (w8a8 int, input: dynamic/{symmetric_to_str(self.input_symmetric)}, weight: {scale_to_str(self.load_weight_scale)}/symmetric))"
|
||||
|
||||
def get_weights(self, weights: "Weights", prefix: str):
|
||||
w = weights.get_tensor(f"{prefix}.weight", to_dtype=False)
|
||||
|
Loading…
Reference in New Issue
Block a user