Skip to content

Commit 3ad03a3

Browse files
Deployed f85d9c3 with MkDocs version: 1.6.1
0 parents  commit 3ad03a3

File tree

86 files changed

+68562
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+68562
-0
lines changed

.nojekyll

Whitespace-only changes.

404.html

Lines changed: 1258 additions & 0 deletions
Large diffs are not rendered by default.

Documentation Bot/api_reference/index.html

Lines changed: 3082 additions & 0 deletions
Large diffs are not rendered by default.

Documentation Bot/index.html

Lines changed: 1363 additions & 0 deletions
Large diffs are not rendered by default.

Inference/docker/index.html

Lines changed: 1426 additions & 0 deletions
Large diffs are not rendered by default.

Inference/index.html

Lines changed: 1289 additions & 0 deletions
Large diffs are not rendered by default.

Inference/inference/index.html

Lines changed: 3658 additions & 0 deletions
Large diffs are not rendered by default.

Ollama server/index.html

Lines changed: 1300 additions & 0 deletions
Large diffs are not rendered by default.

Query processing LLM/api_reference/index.html

Lines changed: 1926 additions & 0 deletions
Large diffs are not rendered by default.

Query processing LLM/index.html

Lines changed: 1469 additions & 0 deletions
Large diffs are not rendered by default.

Rag Pipeline/Developer Tutorials/change data input/index.html

Lines changed: 1569 additions & 0 deletions
Large diffs are not rendered by default.

Rag Pipeline/Developer Tutorials/change model/index.html

Lines changed: 1559 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# ---
2+
# jupyter:
3+
# jupytext:
4+
# text_representation:
5+
# extension: .py
6+
# format_name: light
7+
# format_version: '1.5'
8+
# jupytext_version: 1.16.3
9+
# kernelspec:
10+
# display_name: openml
11+
# language: python
12+
# name: python3
13+
# ---
14+
15+
# # Tutorial on changing models
16+
# - How would you use a different embedding and llm model?
17+
18+
from __future__ import annotations
19+
20+
import os
21+
import sys
22+
23+
import chromadb
24+
from langchain_community.cache import SQLiteCache
25+
26+
from backend.modules.rag_llm import QASetup
27+
from backend.modules.utils import load_config_and_device
28+
29+
# ## Initial config
30+
31+
config = load_config_and_device("../../../backend/config.json")
32+
config["persist_dir"] = "../../data/doc_examples/chroma_db/"
33+
config["data_dir"] = "../../data/doc_examples/"
34+
config["type_of_data"] = "dataset"
35+
config["training"] = True
36+
config["test_subset"] = True # set this to false while training, this is for demo
37+
# load the persistent database using ChromaDB
38+
client = chromadb.PersistentClient(path=config["persist_dir"])
39+
print(config)
40+
41+
# ## Embedding model
42+
# - Pick a model from HF
43+
44+
config["embedding_model"] = "BAAI/bge-large-en-v1.5"
45+
46+
# ## LLM model
47+
48+
# - Pick a model from Ollama - https://ollama.com/library?sort=popular
49+
# - eg : mistral
50+
#
51+
52+
config["llm_model"] = "mistral"
53+
54+
# +
55+
qa_dataset_handler = QASetup(
56+
config=config,
57+
data_type=config["type_of_data"],
58+
client=client,
59+
)
60+
61+
qa_dataset, _ = qa_dataset_handler.setup_vector_db_and_qa()
62+
# -
63+
64+
# # IMPORTANT
65+
# - Do NOT forget to change the model to the best model in ollama/get_ollama.sh

0 commit comments

Comments
 (0)