ด้วย pip:
pip install dynamic_prompting
หรือติดตั้งจากแหล่งที่มา
git clone https://github.com/ElmiraGhorbani/dynamic_prompting
pip install -e .
เยี่ยมชมเว็บไซต์ Meta Llama (https://llama.meta.com/llama-downloads) และลงทะเบียนเพื่อดาวน์โหลดรุ่น/s
เมื่อลงทะเบียนแล้วคุณจะได้รับอีเมลพร้อม URL เพื่อดาวน์โหลดรุ่น คุณจะต้องใช้ URL นี้เมื่อคุณเรียกใช้สคริปต์ Download.sh
เมื่อคุณได้รับอีเมลนำทางไปยังที่เก็บ Llama ที่ดาวน์โหลดมาแล้วและเรียกใช้สคริปต์ Download.sh
เมื่อคุณดาวน์โหลดโมเดลแล้วใส่ไว้ในโฟลเดอร์นี้
มิฉะนั้นคุณสามารถใช้วิธีนี้:
- Step 1: Go to your Hugging Face account “Settings” and then “Access Tokens” on the left column, and copy the token you need.
- Step 2: On your terminal, export your token starting with “HF_”. Use a distinct name (for example, HF_TOKEN) for each token you export.
You may add this line to your ~/.bashrc if you do not want to export it every time you start a session.
export HF_TOKEN="HF_XXXXXXXXXXXXX"
คลาส EMBEDDINGS ได้รับการออกแบบมาเพื่อเชื่อมต่อกับโมเดลการฝังข้อความ มีผู้ให้บริการโมเดลการฝังจำนวนมาก (Openai, Cohere, Hugging Face, ฯลฯ ) ปัจจุบันคลาสนี้มีอินเทอร์เฟซมาตรฐานสำหรับ MXBAI-EMBED-LARGE-V1 , BGE-SMALL-EN-V1.5 และ NOMIC-EMBED-TEXT-V1.5
ในการเริ่มต้นดาวน์โหลดโมเดลและวางไว้ในโฟลเดอร์นี้
git lfs install
git clone https://huggingface.co/nomic-ai/nomic-embed-text-v1.5
cd nomic-embed-text-v1.5
git lfs fetch
git clone https://huggingface.co/BAAI/bge-small-en-v1.5
cd bge-small-en-v1.5
git lfs fetch
git clone https://huggingface.co/mixedbread-ai/mxbai-embed-large-v1
cd mxbai-embed-large-v1
git lfs fetch
ตรวจสอบตัวอย่าง iipynb