--- base_model: Qwen/Qwen3-VL-4B-Instruct library_name: peft tags: - base_model:Qwen/Qwen3-VL-4B-Instruct - lora - transformers - health-recommendation - chinese - healthcare --- # Health Recommendation Model 一个基于 Qwen3-VL-4B-Instruct 的健康干预方案生成模型。 ## Model Description 这个模型是专门针对健康推荐和干预方案生成任务进行微调的 LoRA 适配器。它能够根据用户提供的症状信息,生成个性化的健康干预方案,包括生活方式建议、心理干预和环境改造建议。 ### 主要功能 - **症状分析**: 基于用户提供的症状信息进行分析 - **干预方案生成**: 生成包含生活方式、心理、环境三个维度的干预建议 - **理论依据**: 方案基于 P3 框架或 PROCEED 框架 - **评估指标**: 提供可量化的评估指标 ### 模型特点 - **Base Model**: Qwen/Qwen3-VL-4B-Instruct - **Fine-tuning Method**: LoRA (Low-Rank Adaptation) - **Language**: 中文 (Chinese) - **Domain**: Healthcare, Health Recommendation ## Model Details ### Model Description - **Developed by:** oscarzhang - **Model type:** LoRA Adapter for Qwen3-VL-4B-Instruct - **Language(s):** Chinese (中文) - **License:** Apache 2.0 (inherited from base model) - **Finetuned from:** Qwen/Qwen3-VL-4B-Instruct ### Model Sources [optional] - **Repository:** [More Information Needed] - **Paper [optional]:** [More Information Needed] - **Demo [optional]:** [More Information Needed] ## Uses ### Direct Use 这个模型可以直接用于生成健康干预方案。用户需要提供: - 粗症状(主要症状描述) - 细化症状(具体症状细节) 模型将输出包含以下内容的干预方案: 1. **推荐干预**: - 生活方式:具体的行动建议 - 心理:心理认知层面的干预 - 环境:环境改造建议 2. **评估指标**:可量化测量的指标 ### 使用示例 ```python from peft import PeftModel, PeftConfig from transformers import AutoModelForCausalLM, AutoTokenizer # 加载基础模型和适配器 base_model = AutoModelForCausalLM.from_pretrained( "Qwen/Qwen3-VL-4B-Instruct", trust_remote_code=True ) model = PeftModel.from_pretrained(base_model, "oscarzhang/HealthRecommendation") tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-VL-4B-Instruct", trust_remote_code=True) # 生成干预方案 prompt = """请基于症状信息,生成个性化的健康干预方案。 粗症状:疲劳 细化症状:早晨起床后持续疲惫感,影响日常工作""" inputs = tokenizer(prompt, return_tensors="pt") outputs = model.generate(**inputs, max_new_tokens=500, temperature=0.3) response = tokenizer.decode(outputs[0], skip_special_tokens=True) print(response) ``` ### Downstream Use 这个模型可以进一步微调用于: - 特定疾病的干预方案生成 - 不同年龄段人群的健康建议 - 结合更多健康数据的推荐系统 ### Out-of-Scope Use ⚠️ **重要限制**: - 本模型仅提供生活干预建议,**不做医疗诊断** - 不应用于紧急医疗情况 - 对于需要医疗干预的情况,必须明确指出需要就医 - 不应替代专业医疗建议 ## Bias, Risks, and Limitations [More Information Needed] ### Recommendations Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. ## How to Get Started with the Model Use the code below to get started with the model. [More Information Needed] ## Training Details ### Training Data 训练数据包含126个健康干预方案样本,每个样本包含: - 症状信息(粗症状和细化症状) - 理论框架分析(P3框架和PROCEED框架) - 完整的干预方案(生活方式、心理、环境三个维度) - 评估指标 ### Training Procedure #### Preprocessing 训练数据经过以下预处理: - 症状标准化 - 理论框架提取 - 干预方案结构化 - 质量评分验证 #### Training Hyperparameters - **Training method**: LoRA (Low-Rank Adaptation) - **Training regime**: fp16 mixed precision - **LoRA rank (r)**: 16 - **LoRA alpha**: 16 - **LoRA dropout**: 0.05 - **Target modules**: v_proj, q_proj, k_proj, o_proj - **Learning rate**: 2e-4 (with linear decay and warmup) - **Batch size**: 1 (with gradient accumulation of 8) - **Training steps**: 100 - **Max sequence length**: 512 tokens #### Training Results - **Initial Loss**: 2.5 - **Final Loss**: 0.7 - **Loss reduction**: 72% - **Training time**: ~1.7 hours ## Evaluation ### Testing Data, Factors & Metrics #### Testing Data [More Information Needed] #### Factors [More Information Needed] #### Metrics [More Information Needed] ### Results [More Information Needed] #### Summary ## Model Examination [optional] [More Information Needed] ## Environmental Impact Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700). - **Hardware Type:** [More Information Needed] - **Hours used:** [More Information Needed] - **Cloud Provider:** [More Information Needed] - **Compute Region:** [More Information Needed] - **Carbon Emitted:** [More Information Needed] ## Technical Specifications [optional] ### Model Architecture and Objective [More Information Needed] ### Compute Infrastructure [More Information Needed] #### Hardware [More Information Needed] #### Software [More Information Needed] ## Citation [optional] **BibTeX:** [More Information Needed] **APA:** [More Information Needed] ## Glossary [optional] [More Information Needed] ## More Information [optional] [More Information Needed] ## Model Card Authors [optional] [More Information Needed] ## Model Card Contact [More Information Needed] ### Framework versions - PEFT 0.17.1