Skip to content

Commit

Permalink
Deployed 04e9828 with MkDocs version: 1.6.0
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 26, 2024
0 parents commit 631d059
Show file tree
Hide file tree
Showing 84 changed files with 61,361 additions and 0 deletions.
Empty file added .nojekyll
Empty file.
1,174 changes: 1,174 additions & 0 deletions 404.html

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

3,580 changes: 3,580 additions & 0 deletions Inference/inference/index.html

Large diffs are not rendered by default.

1,216 changes: 1,216 additions & 0 deletions Ollama server/index.html

Large diffs are not rendered by default.

1,572 changes: 1,572 additions & 0 deletions Query processing LLM/api_reference/index.html

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

65 changes: 65 additions & 0 deletions Rag Pipeline/Developer Tutorials/change_model.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# ---
# 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

import os
import sys

import chromadb
from langchain_community.cache import SQLiteCache

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

# ## 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 631d059

Please sign in to comment.