--- base_model: unsloth/Qwen3-8B-unsloth-bnb-4bit library_name: peft pipeline_tag: text-generation tags: - base_model:adapter:unsloth/Qwen3-8B-unsloth-bnb-4bit - lora - sft - transformers - trl - unsloth datasets: - krisfu/delicate_medical_r1_data_chinese language: - zh --- # Model Card for Model ID This is a LoRA adapter for `unsloth/Qwen3-8B-unsloth-bnb-4bit`, fine-tuned for Chinese medical question-answering tasks. It's designed to provide helpful, detailed, and harmless responses to general medical inquiries based on the provided dataset. ## Model Details ### Model Description This model is the result of Supervised Fine-Tuning (SFT) on the Qwen3-8B base model using the PEFT library with LoRA. The fine-tuning was performed using the Unsloth library to optimize for speed and memory efficiency. The model is specifically trained on the `krisfu/delicate_medical_r1_data_chinese` dataset, which contains a collection of Chinese medical questions and answers. - **Developed by:** Ronan - **Model type:** Qwen3 (Transformer-based Language Model) - **Language(s) (NLP):** Chinese (zh) - **License:** Apache-2.0 (Inherited from the base model, but you can choose another) - **Finetuned from model:** `unsloth/Qwen3-8B-unsloth-bnb-4bit` ### Model Sources [optional] - **Repository:** [https://huggingface.co/ronan7878/yiliao_qwen/] - **Base Model Repository:** [https://huggingface.co/unsloth/Qwen3-8B-unsloth-bnb-4bit](https://huggingface.co/unsloth/Qwen3-8B-unsloth-bnb-4bit) ## Uses ### Direct Use This model is intended for direct use as a question-answering assistant in the Chinese medical domain. It can be used in chatbots, as a research aid, or for generating preliminary medical information. **This model is not a substitute for professional medical advice, diagnosis, or treatment.** **Example prompt:** "我最近总是感到疲劳,并且伴有头痛,可能是什么原因?" ### Out-of-Scope Use This model should **not** be used for: * Providing definitive medical diagnoses or treatment plans. * Emergency medical situations. * Generating content that could be harmful, unethical, or misleading. * Any use case where model error could lead to harm. ## Bias, Risks, and Limitations The model's knowledge is limited to the data it was trained on, which may not be comprehensive or up-to-date. It may generate plausible-sounding but incorrect medical information. The training data may contain inherent biases, which the model could reproduce or amplify. It is a language model and has no true understanding of medical concepts. ### Recommendations Always consult a qualified healthcare professional for any medical concerns. The model's outputs should be fact-checked and reviewed by a human expert before being used in any critical application. ## How to Get Started with the Model Use the code below to get started with the model using the Unsloth library. ```python from unsloth import FastLanguageModel import torch model, tokenizer = FastLanguageModel.from_pretrained( model_name = "ronan7878/yiliao_qwen", max_seq_length = 2048, dtype = None, load_in_4bit = True, ) # Perform inference inputs = tokenizer( [ "我最近总是感到疲劳,并且伴有头痛,可能是什么原因?" ], return_tensors = "pt").to("cuda") outputs = model.generate(**inputs, max_new_tokens = 128, use_cache = True) print(tokenizer.batch_decode(outputs)) ``` ## Training Details ### Training Data The model was fine-tuned on the krisfu/delicate_medical_r1_data_chinese dataset. This dataset consists of Chinese medical question-and-answer pairs designed for fine-tuning language models. ### Training Procedure The model was trained using the Supervised Fine-Tuning (SFT) method with the TRL library. The Unsloth library was used to enable 4-bit quantization and LoRA for efficient training. #### Training Hyperparameters - Training regime: bnb-4bit quantization with LoRA adapters - LoRA r: 16 - LoRA alpha: 32 - Optimizer: AdamW - Learning Rate: 2e-4 ### Framework versions - PEFT 0.17.1 - Transformers 4.43.3 - TRL 0.9.6 - Unsloth 2025.9