You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
File "/Users/==/.pyenv/versions/hack/lib/python3.11/site-packages/langchain_community/chat_models/mlx.py", line 184, in _stream
text = self.tokenizer.decode(token.item())
^^^^^^^^^^
AttributeError: 'int' object has no attribute 'item'
Uncaught exception. Entering post mortem debugging
Description
Hi there,
I assume this bug is similar to this issue #20561. Why is that? Because if you locally apply changes from this patch ad48f77 starting from line 174 to langchain_community/chat_models/mlx.py, the bug disappears.
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
File "/Users/==/.pyenv/versions/hack/lib/python3.11/site-packages/langchain_community/chat_models/mlx.py", line 184, in _stream
text = self.tokenizer.decode(token.item())
^^^^^^^^^^
AttributeError: 'int' object has no attribute 'item'
Uncaught exception. Entering post mortem debugging
Description
Hi there,
I assume this bug is similar to this issue #20561. Why is that? Because if you locally apply changes from this patch ad48f77 starting from line 174 to langchain_community/chat_models/mlx.py, the bug disappears.
Best wishes
System Info
langchain==0.2.12
langchain-community==0.2.11
langchain-core==0.2.28
langchain-experimental==0.0.64
langchain-huggingface==0.0.3
langchain-text-splitters==0.2.2
mac
3.11.9
The text was updated successfully, but these errors were encountered: