Files
MtoRagSystem/templates/admin/model_config/create.html.twig

161 lines
7.2 KiB
Twig
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{% extends 'admin/base.html.twig' %}
{% block title %}Neue Modell-Generierungskonfiguration{% endblock %}
{% block body %}
<div class="d-flex justify-content-between align-items-center mb-4">
<h1 class="h3">Neue Modell-Generierungskonfiguration</h1>
<a href="{{ path('admin_model_config_list') }}"
class="btn btn-sm btn-outline-secondary">
Zurück
</a>
</div>
<div class="card bg-black border-secondary text-light">
<div class="card-body">
<form method="post">
<input type="hidden" name="_token"
value="{{ csrf_token('create_model_config') }}">
<div class="row g-4">
<!-- Modell -->
<div class="col-md-6">
<label class="form-label">Modellname</label>
<input type="text"
name="model_name"
class="form-control bg-dark text-light border-secondary"
placeholder="z. B. qwen3:latest"
required>
<div class="form-text text-secondary">
Exakter Modellname wie im KI-Endpunkt konfiguriert (z. B. Ollama oder API).
</div>
</div>
<!-- Stream -->
<div class="col-md-6 d-flex align-items-center">
<div class="form-check form-switch mt-4">
<input class="form-check-input"
type="checkbox"
name="stream"
value="1"
id="streamSwitch" checked>
<label class="form-check-label" for="streamSwitch">
Streaming aktivieren
</label>
</div>
<div class="form-text text-secondary ms-3">
Aktiviert Token-Streaming im Chat (empfohlen für bessere UX).
</div>
</div>
<!-- Temperature -->
<div class="col-md-4">
<label class="form-label">Temperature</label>
<input type="number"
step="0.05"
min="0"
max="2"
name="temperature"
value="0.35"
class="form-control bg-dark text-light border-secondary"
required>
<div class="form-text text-secondary">
Steuert die Kreativität der Antworten.
Niedrige Werte (0.20.4) erzeugen stabile, sachliche Ergebnisse empfohlen für RAG-Systeme.
Höhere Werte führen zu freieren, weniger deterministischen Antworten.
</div>
</div>
<!-- Top K -->
<div class="col-md-4">
<label class="form-label">Top K</label>
<input type="number"
min="1"
name="top_k"
value="40"
class="form-control bg-dark text-light border-secondary"
required>
<div class="form-text text-secondary">
Begrenzt die Anzahl der wahrscheinlichsten Token, aus denen das Modell auswählt.
Niedrigere Werte = konservativer, höhere Werte = flexibler.
2050 ist für Wissenssysteme üblich.
</div>
</div>
<!-- Top P -->
<div class="col-md-4">
<label class="form-label">Top P</label>
<input type="number"
step="0.05"
min="0"
max="1"
name="top_p"
value="0.9"
class="form-control bg-dark text-light border-secondary"
required>
<div class="form-text text-secondary">
Nucleus Sampling: Das Modell berücksichtigt nur Token,
deren kumulative Wahrscheinlichkeit innerhalb dieses Werts liegt.
0.80.95 bietet eine gute Balance zwischen Stabilität und Natürlichkeit.
</div>
</div>
<!-- Repeat Penalty -->
<div class="col-md-6">
<label class="form-label">Repeat Penalty</label>
<input type="number"
step="0.05"
min="0"
max="5"
name="repeat_penalty"
value="1.1"
class="form-control bg-dark text-light border-secondary"
required>
<div class="form-text text-secondary">
Bestraft Wortwiederholungen. Werte leicht über 1.0 (z. B. 1.11.15)
verhindern Schleifen und redundante Antworten.
</div>
</div>
<!-- Num Ctx -->
<div class="col-md-6">
<label class="form-label">Context Window (num_ctx)</label>
<input type="number"
min="512"
max="32768"
name="num_ctx"
value="8192"
class="form-control bg-dark text-light border-secondary"
required>
<div class="form-text text-secondary">
Maximale Kontextlänge in Tokens (Systemprompt + Benutzerfrage + Retrieval-Chunks).
Muss vom Modell unterstützt werden.
Höhere Werte ermöglichen größere Wissenskontexte, erhöhen jedoch Speicher- und Rechenbedarf.
</div>
</div>
</div>
<hr class="border-secondary my-4">
<div class="d-flex justify-content-end">
<button type="submit"
class="btn btn-outline-info">
Konfiguration speichern
</button>
</div>
</form>
</div>
</div>
<div class="mt-4 small text-secondary">
Hinweis: Neue Konfigurationen werden zunächst inaktiv gespeichert und
müssen separat aktiviert werden. Pro Modell kann nur eine Version aktiv sein.
</div>
{% endblock %}