[deploy] Oracle 环境部署 + 模型基准测试 + OllamaAdapter 优化
- Oracle 依赖安装: flask/gunicorn/requests/PyYAML/opencv/numpy 全部成功 - FAM-Edge 全部 8 个模块导入验证 PASS - llava-phi3 基准测试: 冷启动 109s, 预热无限制 13.35s, 预热+num_predict=30 仅 4.34s PASS - OllamaAdapter 新增 num_predict 可配置参数 (默认 500) - config.yaml.example 新增 num_predict 配置项 - 创建 PROGRESS.md 进度追踪文档
This commit is contained in:
@@ -24,6 +24,7 @@ class OllamaAdapter(BaseModelAdapter):
|
||||
self.base_url = config.get('base_url', 'http://localhost:11434')
|
||||
self.model_name = config.get('model_name', 'llava-phi3')
|
||||
self.timeout = config.get('timeout', 240)
|
||||
self.num_predict = config.get('num_predict', 500)
|
||||
cb_cfg = config.get('circuit_breaker', {})
|
||||
self._cb = CircuitBreaker(
|
||||
threshold=cb_cfg.get('threshold', 5),
|
||||
@@ -84,7 +85,7 @@ class OllamaAdapter(BaseModelAdapter):
|
||||
"prompt": prompt,
|
||||
"images": images,
|
||||
"stream": False,
|
||||
"options": {"temperature": 0.2, "top_p": 0.8}
|
||||
"options": {"temperature": 0.2, "top_p": 0.8, "num_predict": self.num_predict}
|
||||
},
|
||||
timeout=self.timeout
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user