網站建設微信商城多少錢病毒式營銷案例
Llama 2 with langchain項目詳解(三)
17.3 Llama 2 with langchain基礎
本節(jié)講解在LangChain中使用Llama 2模型的基礎知識,展示如何運行LangChain的代碼,及在云端運行Llama 2的700億模型。
首先,使用Python的pip管理器安裝一系列庫,包括huggingface/transformers、datasets、loralib、sentencepiece、bitsandbytes、accelerate、xformers、einops和langchain。
1. !pip -q install git+https://github.com/huggingface/transformers # need to install from github
2. !pip install -q datasets loralib sentencepiece
3. !pip -