langchain
langchain copied to clipboard
[Feature] Updated HuggingFace LLM Creator to Support Device Customization
- As described in HuggingFace source code,
device
parameter supports multiple input types. (Link: https://github.com/huggingface/transformers/blob/v4.28.1/src/transformers/pipelines/init.py#L605-L607) - In this PR, it enables
cpu
only acceleration for older laptops which doesn’t have powerful GPU. When the CPU core is high, the speed is pretty fast. - Example Jupyter notebook is added. All previous examples are tested.
Review Request: LLM/Chat Wrappers
- @hwchase17
- @agola11
@hwchase17 , conflicts resolved. please take a look at your convenience. thank you.
@skcoirz Hi , could you, please, resolve the merging issues? After that ping me and I push this PR for the review. Thanks!
Closing because the PR wouldn't line up with the current directory structure of the library (would need to be in /libs/langchain/langchain instead of /langchain). Feel free to reopen against the current head if it's still relevant!