Skip to content

Commit

Permalink
Fix style and run pre-commit check
Browse files Browse the repository at this point in the history
  • Loading branch information
neilmehta24 committed Dec 20, 2024
1 parent e9a573a commit 40f6ad1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions outlines/processors/base_logits_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ def _to_torch(tensor_like: Array) -> torch.Tensor:
# https://ml-explore.github.io/mlx/build/html/usage/numpy.html#pytorch
if tensor_like.dtype == mx.bfloat16:
tensor_like = tensor_like.astype(mx.float32)
return torch.from_dlpack(
np.array(tensor_like, copy=False)
)
return torch.from_dlpack(np.array(tensor_like, copy=False))

elif is_jax_array_type(type(tensor_like)):
import jax
Expand Down

0 comments on commit 40f6ad1

Please sign in to comment.