langchain icon indicating copy to clipboard operation
langchain copied to clipboard

[Feature] Updated HuggingFace LLM Creator to Support Device Customization

Open skcoirz opened this issue 1 year ago • 1 comments

  • 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

skcoirz avatar May 09 '23 04:05 skcoirz

@hwchase17 , conflicts resolved. please take a look at your convenience. thank you.

skcoirz avatar May 19 '23 02:05 skcoirz

@skcoirz Hi , could you, please, resolve the merging issues? After that ping me and I push this PR for the review. Thanks!

leo-gan avatar Sep 13 '23 01:09 leo-gan

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!

efriis avatar Nov 07 '23 04:11 efriis