update info page

This commit is contained in:
Cyberes 2023-08-29 14:00:35 -06:00
parent ba0bc87434
commit b44dfa2471
4 changed files with 20 additions and 3 deletions

View File

@ -20,7 +20,7 @@ config_required_vars = ['token_limit', 'concurrent_gens', 'mode', 'llm_middlewar
mode_ui_names = {
'oobabooga': ('Text Gen WebUI (ooba)', 'Blocking API url'),
'hf-textgen': ('UNDEFINED', 'UNDEFINED'),
'hf-textgen': ('Text Gen WebUI (ooba)', 'Blocking API url'),
}

View File

@ -0,0 +1,13 @@
hf_textget_info = """<p><strong>Important:</strong> This endpoint is running <a href="https://github.com/huggingface/text-generation-inference" target="_blank">text-generation-inference</a> and not all Oobabooga parameters are supported.</p>
<strong>Supported Parameters:</strong>
<ul>
<li><kbd>do_sample</kbd></li>
<li><kbd>max_new_tokens</kbd></li>
<li><kbd>repetition_penalty</kbd></li>
<li><kbd>seed</kbd></li>
<li><kbd>temperature</kbd></li>
<li><kbd>stopping_strings</kbd></li>
<li><kbd>top_k</kbd></li>
<li><kbd>top_p</kbd></li>
<li><kbd>typical_p</kbd></li>
</ul>"""

View File

@ -11,6 +11,7 @@ from llm_server import opts
from llm_server.config import ConfigLoader, config_default_vars, config_required_vars, mode_ui_names
from llm_server.database import get_number_of_rows, init_db
from llm_server.helpers import resolve_path
from llm_server.llm.hf_textgen.info import hf_textget_info
from llm_server.routes.cache import cache, redis
from llm_server.routes.queue import start_workers
from llm_server.routes.stats import SemaphoreCheckerThread, process_avg_gen_time
@ -135,7 +136,8 @@ def home():
mode_name=mode_ui_names[opts.mode][0],
api_input_textbox=mode_ui_names[opts.mode][1],
context_size=opts.context_size,
stats_json=json.dumps(stats, indent=4, ensure_ascii=False)
stats_json=json.dumps(stats, indent=4, ensure_ascii=False),
extra_info=hf_textget_info if opts.mode == 'hf-textgen' else '',
)

View File

@ -85,9 +85,11 @@
<li>Enter <kbd>{{ client_api }}</kbd> in the <kbd>{{ api_input_textbox }}</kbd> textbox.</li>
<li>Click <kbd>Connect</kbd> to test the connection.</li>
<li>Open your preset config and set <kbd>Context Size</kbd> to {{ context_size }}.</li>
<li>Follow this guide to get set up: <a href="https://rentry.org/freellamas" target="_blank">rentry.org/freellamas</a></li>
<li>Follow this guide to get set up: <a href="https://rentry.org/freellamas" target="_blank">rentry.org/freellamas</a>
</li>
</ol>
</div>
<div id="extra-info">{{ extra_info|safe }}</div>
</div>
<br>