Initial commit: LLM workshop materials
Five modules covering nanoGPT, Ollama, RAG, semantic search, and neural networks. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
commit
1604671d36
56 changed files with 5577 additions and 0 deletions
12
03-rag/cache_model.py
Normal file
12
03-rag/cache_model.py
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# cache_model.py
|
||||
#
|
||||
# Pre-download the embedding model so build.py doesn't have to fetch it.
|
||||
|
||||
from llama_index.embeddings.huggingface import HuggingFaceEmbedding
|
||||
|
||||
embed_model = HuggingFaceEmbedding(
|
||||
cache_folder="./models",
|
||||
model_name="BAAI/bge-large-en-v1.5"
|
||||
)
|
||||
|
||||
print("Embedding model cached in ./models")
|
||||
Loading…
Add table
Add a link
Reference in a new issue