ai:private-gpt
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ai:private-gpt [2024/04/23 00:34] – created Wulf Rajek | ai:private-gpt [2024/05/01 17:33] (current) – Wulf Rajek | ||
---|---|---|---|
Line 128: | Line 128: | ||
ENV PYTHONPATH=" | ENV PYTHONPATH=" | ||
- | USER worker | + | #USER worker |
#ENTRYPOINT ["/ | #ENTRYPOINT ["/ | ||
ENTRYPOINT / | ENTRYPOINT / | ||
- | |||
EOD | EOD | ||
Line 144: | Line 143: | ||
## Execute the main container command | ## Execute the main container command | ||
exec " | exec " | ||
- | |||
EOD | EOD | ||
Line 206: | Line 204: | ||
PGPT_EMBEDDING_MODE: | PGPT_EMBEDDING_MODE: | ||
| | ||
+ | #Microsoft Phi-3 Mini 4k | ||
+ | PGPT_HF_REPO_ID: | ||
+ | # | ||
+ | PGPT_HF_MODEL_FILE: | ||
+ | PGPT_PROMPT_STYLE: | ||
+ | |||
#Meta Llama 3 | #Meta Llama 3 | ||
# | # | ||
# | # | ||
- | #PGPT_TOKENIZER: "meta-llama/ | + | #PGPT_PROMPT_STYLE: "llama3" |
- | + | ||
- | #OpenOrca Mistral | + | #OpenOrca Mistral |
# | # | ||
# | # | ||
- | | + | |
PGPT_EMBEDDING_HF_MODEL_NAME: | PGPT_EMBEDDING_HF_MODEL_NAME: | ||
# | # | ||
- | | + | |
TOKENIZERS_PARALLELISM: | TOKENIZERS_PARALLELISM: | ||
+ | #PGPT_NGL: 20 | ||
+ | |||
+ | PGPT_MAX_NEW_TOKENS: | ||
+ | PGPT_CONTEXT_WINDOW: | ||
+ | PGPT_TEMPERATURE: | ||
- | PGPT_PROMPT_STYLE: | ||
EMBEDDING_INGEST_MODE: | EMBEDDING_INGEST_MODE: | ||
EMBEDDING_COUNT_WORKERS: | EMBEDDING_COUNT_WORKERS: | ||
Line 241: | Line 250: | ||
</ | </ | ||
- | ===== NPL settings patch ===== | + | ===== NGL settings patch ===== |
To add the amount of layers loaded in the GPU for llamacpp, apply this NGL option patch, then add " | To add the amount of layers loaded in the GPU for llamacpp, apply this NGL option patch, then add " | ||
Line 293: | Line 302: | ||
</ | </ | ||
+ | |||
+ | ===== Max New Tokens / Context Size / Temperature settings patch ===== | ||
+ | |||
+ | To be able to set Max New Tokens, Context Size and Temperature in the docker compose file as variables, the settings.yaml file needs to be adjusted. | ||
+ | |||
+ | docker compose file additions: | ||
+ | < | ||
+ | environment: | ||
+ | PGPT_MAX_NEW_TOKENS: | ||
+ | PGPT_CONTEXT_WINDOW: | ||
+ | PGPT_TEMPERATURE: | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | cat << EOD >> token-ctx-temp-settings-option.patch | ||
+ | diff --git a/ | ||
+ | index e881a55..8666b86 100644 | ||
+ | --- a/ | ||
+ | +++ b/ | ||
+ | @@ -37,10 +37,10 @@ ui: | ||
+ | llm: | ||
+ | mode: llamacpp | ||
+ | # Should be matching the selected model | ||
+ | - max_new_tokens: | ||
+ | - context_window: | ||
+ | + max_new_tokens: | ||
+ | + context_window: | ||
+ | | ||
+ | - temperature: | ||
+ | + temperature: | ||
+ | |||
+ | rag: | ||
+ | | ||
+ | EOD | ||
+ | |||
+ | git apply token-ctx-temp-settings-option.patch | ||
+ | </ | ||
+ | |||
+ | ===== CSS Customisation ===== | ||
+ | |||
+ | To adjust the main input box and fix mobile/low height browser window issue of the input box wrapping to the right, some css trickery is required. The last three css lines are added to privategpt/ | ||
+ | <code python privategpt/ | ||
+ | def _build_ui_blocks(self) -> gr.Blocks: | ||
+ | logger.debug(" | ||
+ | with gr.Blocks( | ||
+ | title=UI_TAB_TITLE, | ||
+ | theme=gr.themes.Soft(primary_hue=slate), | ||
+ | css=" | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | ".logo img { height: 100% }" | ||
+ | " | ||
+ | "# | ||
+ | "# | ||
+ | "#col { height: calc(100vh - 112px - 16px) !important; }" | ||
+ | "# | ||
+ | "# | ||
+ | "#col { min-height: | ||
+ | ) as blocks: | ||
+ | with gr.Row(): | ||
+ | |||
+ | </ | ||
+ |
ai/private-gpt.1713828854.txt.gz · Last modified: 2024/04/23 00:34 by Wulf Rajek