初始化项目,由ModelHub XC社区提供模型

Model: ericoh929/qwen3-1.7b-lamini-qlora-instruction-tuned
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-09-10 04:58:20 +08:00
commit 5edc243636
16 changed files with 152385 additions and 0 deletions

21
prompt_format.py Normal file
View File

@@ -0,0 +1,21 @@
# prompt_format.py
from __future__ import annotations
RESPONSE_TAG = "### Response:"
def format_instruction_prompt(instruction: str, inp: str | None = None) -> str:
instruction = (instruction or "").strip()
inp = (inp or "").strip() if inp is not None else ""
if inp:
return (
f"### Instruction:\n{instruction}\n\n"
f"### Input:\n{inp}\n\n"
f"{RESPONSE_TAG}\n"
)
else:
return (
f"### Instruction:\n{instruction}\n\n"
f"{RESPONSE_TAG}\n"
)