Skip to content

Commit

Permalink
Typos. (#1084)
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentMazare authored Oct 13, 2023
1 parent eefad2b commit 07af87a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions candle-pyo3/e5.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def average_pool(last_hidden_states: torch.Tensor, attention_mask: torch.Tensor)

loss = torch.nn.L1Loss()
error = loss(hf_pooled, candle_pooled).mean().item()
print(f"Mean error between torch-referenze and candle: {error}")
print(f"Mean error between torch-reference and candle: {error}")

# Quantize all attention 'weights'
quantized_tensors = {}
Expand Down Expand Up @@ -101,4 +101,4 @@ def average_pool(last_hidden_states: torch.Tensor, attention_mask: torch.Tensor)

candle_pooled_2 = average_pool(torch.tensor(encoder_out_2.values()), hf_tokenized["attention_mask"])
error = loss(hf_pooled, candle_pooled_2).mean().item()
print(f"Mean error between torch-referenze and quantized-candle: {error}")
print(f"Mean error between torch-reference and quantized-candle: {error}")

0 comments on commit 07af87a

Please sign in to comment.