Hermes SIQ-1-35B on ZeroGPU (llama-cpp-python recipe)
Browse files55 unmodified lines5657585959606162733 unmodified lines79679779879979980080180280380480580680080180280380480580680780880981081181281381481581655 unmodified linesGGUF_FILE = os.environ.get("GGUF_FILE", "gguf/SIQ-1-35B.Q4_K_M.gguf")N_CTX = int(os.environ.get("N_CTX", "16384")) # keep cold-start init light
print("=== APP BUILD MARKER: chunkfix-v3 ===", flush=True)print("=== APP BUILD MARKER: chunkfix-v4 ===", flush=True)print("Downloading GGUF from the Hub ...", flush=True)MODEL_PATH = hf_hub_download(GGUF_REPO, GGUF_FILE)print("GGUF ready at", MODEL_PATH, flush=True)733 unmodified lines answer = raw = thinking = tools = doc = "" doc_name = "artifact.html" in_tok = out_tok = 0 try: for answer, raw, thinking, tools, doc, doc_name, in_tok, out_tok in _agent_stream( message, prior, system_prompt, temperature, max_tokens, use_tools ): history[-1]["content"] = _chat_message( answer, thinking, tools, streaming=True, in_tok=in_tok, out_tok=out_tok ) prev = _BUILDING_PREVIEW if doc else _EMPTY_PREVIEW yield history, "", raw, (thinking or _NO_REASONING), doc, prev, (tools or _NO_TOOLS), meta for answer, raw, thinking, tools, doc, doc_name, in_tok, out_tok in _agent_stream( message, prior, system_prompt, temperature, max_tokens, use_tools ): history[-1]["content"] = _chat_message( answer, thinking, tools, streaming=True, in_tok=in_tok, out_tok=out_tok ) prev = _BUILDING_PREVIEW if doc else _EMPTY_PREVIEW yield history, "", raw, (thinking or _NO_REASONING), doc, prev, (tools or _NO_TOOLS), meta except Exception: import traceback tb = traceback.format_exc() history[-1]["content"] = f"⚠️ **generation crashed**\n\n```\n{tb[-1800:]}\n```" yield history, "", tb, (thinking or _NO_REASONING), doc, _EMPTY_PREVIEW, (tools or _NO_TOOLS), meta return history[-1]["content"] = _chat_message(answer, thinking, tools, streaming=False) meta = meta + [{ "turn_id": uuid.uuid4().hex, "user": message, "answer": answer,app.py+16-9