--- # ------------------------------------------------------------------------------ # FILE: roles/llm-inference-multimodel/tasks/models.yml # DESCRIPTION: Phase 1 — ensure the production Qwen GGUF is present on disk. # Idempotent: reuses the stat + size-threshold guard pattern. # # HISTORY (2026-08-06): This file previously downloaded Phi-4-14B # (aux, port 8000) and Mistral-Small-24B (tool-calling, port 8001). # Both were retired on 2026-08-06 when the deployment was # consolidated to a single model (Qwen2.5-14B-Instruct-1M, port # 8002). The download tasks and VRAM co-residency logic were # removed from this file; see git log if a rollback needs them. # # HISTORY (2026-08-07): Qwen2.5-14B-Instruct-1M was superseded by # Qwen3.6-35B-A3B-UD-Q4_K_S (see task t_2ffc0f63). The model # was downloaded out-of-band (direct wget per t_2ffc0f63 runbook) # rather than via this role's get_url pattern. The path and # variables below are updated to reflect the current production # model; the download task is a no-op if the file is already # present (which it is on astro-orbiter as of 2026-08-07+). # # 2026-08-12 (t_0cca74a2): Cleaned up stale Phi-4/Mistral tasks # that referenced undefined variables after the Aug 2026 # consolidation. models.yml now only manages the Qwen3.6-35B # model that is the sole production model. # ------------------------------------------------------------------------------ - name: Create models directory ansible.builtin.file: path: "{{ llm_models_dir }}" state: directory owner: "{{ llm_service_user }}" group: "{{ llm_service_user }}" mode: "0755" become: true # --- Production model: Qwen3.6-35B-A3B-UD-Q4_K_S (port 8002 / router :8003) - - name: Check if Qwen3.6-35B GGUF is present on disk ansible.builtin.stat: path: "{{ llm_qwen_model_path }}" register: llm_qwen_model_stat - name: Report Qwen model presence (model was downloaded out-of-band via t_2ffc0f63) ansible.builtin.debug: msg: >- Qwen model at {{ llm_qwen_model_path }}: exists={{ llm_qwen_model_stat.stat.exists | default(false) }}, size={{ (llm_qwen_model_stat.stat.size | default(0) | int / 1073741824) | round(2) }}GB when: llm_qwen_model_stat.stat.exists | default(false) - name: WARN — Qwen model GGUF not found at expected path ansible.builtin.debug: msg: >- WARNING: Qwen model NOT found at {{ llm_qwen_model_path }}. This model was originally downloaded via task t_2ffc0f63 (direct wget, not via this role's get_url). If the file is missing, re-download it manually or add a get_url task here with the correct HuggingFace URL. Expected URL (bartowski UD-Q4_K_S): https://huggingface.co/bartowski/Qwen3.6-35B-A3B-UD-Q4_K_S-GGUF/resolve/main/Qwen3.6-35B-A3B-UD-Q4_K_S.gguf when: not (llm_qwen_model_stat.stat.exists | default(false))