-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
500a1f6
commit 428e239
Showing
127 changed files
with
110,292 additions
and
40,214 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,21 @@ | ||
import os | ||
from pathlib import Path | ||
|
||
# Directories | ||
EFS_DIR = Path("/efs/shared_storage/goku") | ||
ROOT_DIR = Path(__file__).parent.parent.absolute() | ||
|
||
|
||
DB_CONNECTION_STRING = os.environ.get("DB_CONNECTION_STRING") | ||
DOCS_PATH = os.environ.get("DOCS_PATH") | ||
|
||
# Credentials | ||
OPENAI_API_BASE = os.environ.get("OPENAI_API_BASE", "https://api.endpoints.anyscale.com/v1") | ||
OPENAI_API_KEY = os.environ.get( | ||
"OPENAI_API_KEY", "" | ||
) # https://app.endpoints.anyscale.com/credentials | ||
|
||
# Indexing and model properties | ||
DEVICE = os.environ.get("DEVICE", "cuda") | ||
EMBEDDING_BATCH_SIZE = os.environ.get("EMBEDDING_BATCH_SIZE", 100) | ||
EMBEDDING_ACTORS = os.environ.get("EMBEDDING_ACTORS", 2) | ||
NUM_GPUS = os.environ.get("NUM_GPUS", 1) | ||
INDEXING_ACTORS = os.environ.get("INDEXING_ACTORS", 20) | ||
INDEXING_BATCH_SIZE = os.environ.get("INDEXING_BATCH_SIZE", 128) | ||
|
||
# Response generation properties | ||
EXPERIMENT_NAME = os.environ.get("EXPERIMENT_NAME", "llama-2-7b-gtebase") | ||
DATA_PATH = os.environ.get("DATA_PATH", "datasets/eval-dataset-v1.jsonl") | ||
CHUNK_SIZE = os.environ.get("CHUNK_SIZE", 300) | ||
CHUNK_OVERLAP = os.environ.get("CHUNK_OVERLAP", 50) | ||
EMBEDDING_MODEL = os.environ.get("EMBEDDING_MODEL", "thenlper/gte-base") | ||
LLM = os.environ.get("LLM", "meta-llama/Llama-2-7b-chat-hf") | ||
TEMPERATURE = os.environ.get("TEMPERATURE", 0) | ||
MAX_CONTEXT_LENGTH = os.environ.get("MAX_CONTEXT_LENGTH", 4096) | ||
|
||
# Evaluation properties | ||
REFERENCE_LOC = os.environ.get("REFERENCE_LOC", "experiments/responses/gpt-4-with-source.json") | ||
RESPONSE_LOC = os.environ.get("RESPONSE_LOC", "experiments/responses/$EXPERIMENT_NAME.json") | ||
EVALUATOR = os.environ.get("EVALUATOR", "meta-llama/Llama-2-70b-chat-hf") | ||
EVALUATOR_TEMPERATURE = os.environ.get("EVALUATOR_TEMPERATURE", 0) | ||
EVALUATOR_MAX_CONTEXT_LENGTH = os.environ.get("EVALUATOR_MAX_CONTEXT_LENGTH", 4096) | ||
|
||
# Slack bot integration | ||
SLACK_APP_TOKEN = os.environ.get("SLACK_APP_TOKEN", "") | ||
SLACK_BOT_TOKEN = os.environ.get("SLACK_BOT_TOKEN", "") | ||
EXPERIMENTS_DIR = Path(ROOT_DIR, "experiments") | ||
|
||
# Mappings | ||
EMBEDDING_DIMENSIONS = { | ||
"thenlper/gte-base": 768, | ||
"BAAI/bge-large-en": 1024, | ||
"text-embedding-ada-002": 1536, | ||
} | ||
MAX_CONTEXT_LENGTHS = { | ||
"gpt-4": 8192, | ||
"gpt-3.5-turbo": 4096, | ||
"gpt-3.5-turbo-16k": 16384, | ||
"meta-llama/Llama-2-7b-chat-hf": 4096, | ||
"meta-llama/Llama-2-13b-chat-hf": 4096, | ||
"meta-llama/Llama-2-70b-chat-hf": 4096, | ||
} |
Oops, something went wrong.