From d322281cda5e0151a49cf99f47e4f2b2f9efcf42 Mon Sep 17 00:00:00 2001 From: ValueOn AG Date: Fri, 6 Feb 2026 13:35:00 +0100 Subject: [PATCH] neues text model --- app.py | 10 +++++----- templates/index.html | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/app.py b/app.py index 2a335bc..3dadf9b 100644 --- a/app.py +++ b/app.py @@ -187,11 +187,11 @@ rateLimiter = RateLimiter( # Model mapping: external name -> internal Ollama model name # Production models (optimized for 32GB RAM server): -# - deepseek-ocr: 3.34B params, 8K context, ~6.7GB RAM -# - qwen2.5vl:7b: 8.29B params, 125K context, ~6GB RAM -# - granite3.2-vision: 2B params, 16K context, ~2.4GB RAM +# - qwen2.5:7b: 7.6B params, 128K context, ~4.7GB RAM (Text) +# - qwen2.5vl:7b: 8.29B params, 125K context, ~6GB RAM (Vision) +# - granite3.2-vision: 2B params, 16K context, ~2.4GB RAM (Vision) MODEL_MAPPING = { - "poweron-ocr-general": "deepseek-ocr", + "poweron-text-general": "qwen2.5:7b", "poweron-vision-general": "qwen2.5vl:7b", "poweron-vision-deep": "granite3.2-vision", } @@ -536,7 +536,7 @@ async def _analyzeDocument( # Model-specific context lengths (actual model limits) modelContextLengths = { - "deepseek-ocr": 8192, # 8K context + "qwen2.5:7b": 32768, # Use 32K (model supports 128K but RAM limited) "qwen2.5vl:7b": 32768, # Use 32K (model supports 125K but RAM limited) "granite3.2-vision": 16000, # 16K context } diff --git a/templates/index.html b/templates/index.html index ebed3aa..0b0f26a 100644 --- a/templates/index.html +++ b/templates/index.html @@ -824,11 +824,11 @@ Falls ein Feld nicht erkennbar ist, setze den Wert auf null. ollamaModel: 'granite3.2-vision' }, { - name: 'poweron-ocr-general', - displayName: 'PowerOn OCR General', - description: 'Text-Extraktion / OCR (deepseek-ocr)', + name: 'poweron-text-general', + displayName: 'PowerOn Text General', + description: 'Text-Verarbeitung / Analyse (qwen2.5:7b)', isVision: false, // Text model - no image required - ollamaModel: 'deepseek-ocr' + ollamaModel: 'qwen2.5:7b' } ]; @@ -1174,7 +1174,7 @@ Falls ein Feld nicht erkennbar ist, setze den Wert auf null. // Model-specific context lengths const modelContextLengths = { - 'deepseek-ocr': 8192, + 'qwen2.5:7b': 32768, 'qwen2.5vl:7b': 32768, 'granite3.2-vision': 16000 };