dhammawatthumpra commited on
Commit
ff9cfda
·
1 Parent(s): 40fe0ea

chore: upgrade Qwen model default from 0.5B to 1.5B Instruct

Browse files
webapp/tipitaka-api/app/services/query_transform_service.py CHANGED
@@ -25,7 +25,7 @@ class QueryTransformService:
25
  _model = None
26
 
27
  @classmethod
28
- def preload(cls, model_id: str = "Qwen/Qwen2.5-0.5B-Instruct"):
29
  """Preload the model and tokenizer into memory if not already done."""
30
  if cls._model is not None and cls._tokenizer is not None:
31
  return
@@ -67,7 +67,7 @@ class QueryTransformService:
67
  self.runtime = os.getenv("QWEN_RUNTIME", "transformers")
68
  self.ollama_url = os.getenv("QWEN_OLLAMA_URL", "http://localhost:11434")
69
  self.ollama_model = os.getenv("QWEN_OLLAMA_MODEL", "qwen3.5:0.8b")
70
- self.model_id = os.getenv("QWEN_MODEL_ID", "Qwen/Qwen2.5-0.5B-Instruct")
71
 
72
  def _normalize_key(self, query: str) -> str:
73
  # 1. ปรับรูปอักขระภาษาไทย (NFC) และแปลงเป็นตัวพิมพ์เล็ก
 
25
  _model = None
26
 
27
  @classmethod
28
+ def preload(cls, model_id: str = "Qwen/Qwen2.5-1.5B-Instruct"):
29
  """Preload the model and tokenizer into memory if not already done."""
30
  if cls._model is not None and cls._tokenizer is not None:
31
  return
 
67
  self.runtime = os.getenv("QWEN_RUNTIME", "transformers")
68
  self.ollama_url = os.getenv("QWEN_OLLAMA_URL", "http://localhost:11434")
69
  self.ollama_model = os.getenv("QWEN_OLLAMA_MODEL", "qwen3.5:0.8b")
70
+ self.model_id = os.getenv("QWEN_MODEL_ID", "Qwen/Qwen2.5-1.5B-Instruct")
71
 
72
  def _normalize_key(self, query: str) -> str:
73
  # 1. ปรับรูปอักขระภาษาไทย (NFC) และแปลงเป็นตัวพิมพ์เล็ก