Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use pydantic.v1 in langchain.py #30

Merged
merged 6 commits into from
Aug 19, 2023
Merged

use pydantic.v1 in langchain.py #30

merged 6 commits into from
Aug 19, 2023

Conversation

andri-jpg
Copy link
Contributor

fix issue #29

@LLukas22
Copy link
Owner

Thanks 👍. If the CI passes I'll merge it and create a bugfix release.

@andri-jpg
Copy link
Contributor Author

However, when I attempted to install using pip install . from the source without making any code changes, it also failed and returned errors from Cargo.

@LLukas22
Copy link
Owner

Yeah the tokenizers create had some breaking changes, meaning this PR is needed.

I'll sync the latest main branch of rustformers when i get back home. That means i'll also have to implement custom RoPE scaling and probably Falcon. 🤔

@LLukas22
Copy link
Owner

Alright this seams to work, keep in mind that langchain doesn't officially support pydantic 2 meaning there still could be some issues. I'm merging it for now.

@LLukas22 LLukas22 merged commit 3bc82ba into LLukas22:main Aug 19, 2023
15 checks passed
@andri-jpg
Copy link
Contributor Author

Alright this seams to work, keep in mind that langchain doesn't officially support pydantic 2 meaning there still could be some issues. I'm merging it for now.

Alright, I'll try reinstalling from the source again. I'll create another GitHub issue if any other problems come up.

@LLukas22
Copy link
Owner

Yeah let me know if everything works, then i'll create a new release 👍

@andri-jpg
Copy link
Contributor Author

image
Nice, everything works well. Both llm_rs.langchain and Langchain are running smoothly without any issues. By the way, I've noticed a slight performance improvement here – the generation time has become slightly faster (from 1.4s to 0.8s), model = gpt2.

@LLukas22
Copy link
Owner

Yeah there is less copying going on, as i changed all repeat operations into broadcastable mul/add operations, which means less time should be spend copying data around.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants