ai:private-gpt
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ai:private-gpt [2024/04/23 21:36] – Wulf Rajek | ai:private-gpt [2024/05/01 17:33] (current) – Wulf Rajek | ||
---|---|---|---|
Line 225: | Line 225: | ||
TOKENIZERS_PARALLELISM: | TOKENIZERS_PARALLELISM: | ||
#PGPT_NGL: 20 | #PGPT_NGL: 20 | ||
+ | |||
+ | PGPT_MAX_NEW_TOKENS: | ||
+ | PGPT_CONTEXT_WINDOW: | ||
+ | PGPT_TEMPERATURE: | ||
EMBEDDING_INGEST_MODE: | EMBEDDING_INGEST_MODE: | ||
Line 246: | 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 298: | 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.1713904571.txt.gz · Last modified: 2024/04/23 21:36 by Wulf Rajek