Skip to content

Commit

Permalink
Deployed f2b032d with MkDocs version: 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 22, 2024
0 parents commit c8c8d8a
Show file tree
Hide file tree
Showing 80 changed files with 43,048 additions and 0 deletions.
Empty file added .nojekyll
Empty file.
1,012 changes: 1,012 additions & 0 deletions 404.html

Large diffs are not rendered by default.

1,180 changes: 1,180 additions & 0 deletions Inference/docker/index.html

Large diffs are not rendered by default.

2,347 changes: 2,347 additions & 0 deletions Inference/inference/index.html

Large diffs are not rendered by default.

1,043 changes: 1,043 additions & 0 deletions Inference/readme/index.html

Large diffs are not rendered by default.

1,411 changes: 1,411 additions & 0 deletions Query processing LLM/query_llm/index.html

Large diffs are not rendered by default.

1,115 changes: 1,115 additions & 0 deletions Query processing LLM/readme/index.html

Large diffs are not rendered by default.

1,321 changes: 1,321 additions & 0 deletions Rag Pipeline/Developer Tutorials/change data input/index.html

Large diffs are not rendered by default.

1,313 changes: 1,313 additions & 0 deletions Rag Pipeline/Developer Tutorials/change model/index.html

Large diffs are not rendered by default.

63 changes: 63 additions & 0 deletions Rag Pipeline/Developer Tutorials/change_model.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.16.3
# kernelspec:
# display_name: openml
# language: python
# name: python3
# ---

# # Tutorial on changing models
# - How would you use a different embedding and llm model?

from __future__ import annotations
from langchain_community.cache import SQLiteCache
import os
import sys
import chromadb

from backend.modules.utils import load_config_and_device
from backend.modules.rag_llm import QASetup

# ## Initial config

config = load_config_and_device("../../../backend/config.json")
config["persist_dir"] = "../../data/doc_examples/chroma_db/"
config["data_dir"] = "../../data/doc_examples/"
config["type_of_data"] = "dataset"
config["training"] = True
config["test_subset"] = True #set this to false while training, this is for demo
# load the persistent database using ChromaDB
client = chromadb.PersistentClient(path=config["persist_dir"])
print(config)

# ## Embedding model
# - Pick a model from HF

config["embedding_model"] = "BAAI/bge-large-en-v1.5"

# ## LLM model

# - Pick a model from Ollama - https://ollama.com/library?sort=popular
# - eg : mistral
#

config["llm_model"] = "mistral"

# +
qa_dataset_handler = QASetup(
config=config,
data_type=config["type_of_data"],
client=client,
)

qa_dataset, _ = qa_dataset_handler.setup_vector_db_and_qa()
# -

# # IMPORTANT
# - Do NOT forget to change the model to the best model in ollama/get_ollama.sh
Loading

0 comments on commit c8c8d8a

Please sign in to comment.