PCaPLMM-SFT

PCaPLMM-SFT: Prostate Cancer Patient Lifestyle Management Model via Supervised Fine-Tuning

Research use only. PCaPLMM-SFT is not a medical device and has not been validated for diagnosis, treatment selection, medication adjustment, emergency triage, or autonomous patient care. Its outputs may be incomplete, outdated, unsupported, or clinically inappropriate. Any health-related output must be reviewed against current clinical guidelines and assessed by qualified healthcare professionals.

ไป…้™็ง‘็ ”ไฝฟ็”จใ€‚ PCaPLMM-SFT ไธๆ˜ฏๅŒป็–—ๅ™จๆขฐ๏ผŒๅฐšๆœช็ป่ฟ‡ไธดๅบŠ่ฏŠๆ–ญใ€ๆฒป็–—ๅ†ณ็ญ–ใ€่ฏ็‰ฉ่ฐƒๆ•ดใ€ๆ€ฅ่ฏŠๅˆ†่ฏŠๆˆ–่‡ชไธปๆ‚ฃ่€…็ฎก็†้ชŒ่ฏใ€‚ๆจกๅž‹ๅฏ่ƒฝ็”ŸๆˆไธๅฎŒๆ•ดใ€่ฟ‡ๆ—ถใ€็ผบไน่ฏๆฎๆ”ฏๆŒๆˆ–ไธดๅบŠไธŠไธๆฐๅฝ“็š„ๅ†…ๅฎนใ€‚ไปปไฝ•ๅฅๅบท็›ธๅ…ณ่พ“ๅ‡บๅ‡้กป็ป“ๅˆๆœ€ๆ–ฐไธดๅบŠๆŒ‡ๅ—๏ผŒๅนถ็”ฑๅ…ทๅค‡่ต„่ดจ็š„ๅŒป็–—ไธ“ไธšไบบๅ‘˜ๅฎกๆ ธใ€‚

Model summary

PCaPLMM-SFT is a Chineseโ€“English domain-specific causal language model developed for research on prostate cancer lifestyle-management communication. It was derived from baichuan-inc/Baichuan2-7B-Chat through domain-adaptive training and supervised fine-tuning. The training corpus and instruction data focus on five prespecified domains:

  1. diet and nutrition;
  2. physical activity and exercise;
  3. body-weight management;
  4. medication and treatment adherence; and
  5. psychological and psychosocial support.

The associated evidence-retrieval database, FAISS index, source documents, and training datasets are not included in this repository.

ไธญๆ–‡็ฎ€ไป‹

PCaPLMM-SFT ๆ˜ฏไธ€ไธช้ขๅ‘ๅ‰ๅˆ—่…บ็™Œ็”Ÿๆดปๆ–นๅผ็ฎก็†็ ”็ฉถ็š„ไธญ่‹ฑๆ–‡้ข†ๅŸŸๅŒ–ๅ› ๆžœ่ฏญ่จ€ๆจกๅž‹ใ€‚ๆจกๅž‹ไปฅ Baichuan2-7B-Chat ไธบๅŸบ็ก€๏ผŒ็ป้ข†ๅŸŸ็ปง็ปญ่ฎญ็ปƒไธŽ็›‘็ฃๅพฎ่ฐƒๆž„ๅปบ๏ผŒไธป่ฆ่ฆ†็›–้ฅฎ้ฃŸ่ฅๅ…ปใ€ไฝ“ๅŠ›ๆดปๅŠจใ€ไฝ“้‡็ฎก็†ใ€่ฏ็‰ฉๆˆ–ๆฒป็–—ไพไปŽๆ€งไปฅๅŠๅฟƒ็†็คพไผšๆ”ฏๆŒไบ”็ฑปๅบ”็”จๅœบๆ™ฏใ€‚

ไธŽ็ ”็ฉถ้…ๅฅ—็š„ๆ–‡็Œฎ่ฏๆฎๅบ“ใ€FAISS ็ดขๅผ•ใ€ๅŽŸๅง‹ๆ–‡็ŒฎๅŠ่ฎญ็ปƒๆ•ฐๆฎๆœชๅŒ…ๅซๅœจๆœฌไป“ๅบ“ไธญใ€‚

Model details

Item Description
Repository RomilY/PCaPLMM_SFT
Base model baichuan-inc/Baichuan2-7B-Chat
Architecture Baichuan decoder-only causal language model
Approximate scale 7B parameters
Release format Merged full-model weights, Safetensors
Primary task Bilingual medical-domain text generation
Languages Chinese and English
Context limit in the released configuration 4,096 tokens
Training framework LLaMA-Factory 0.7.0
Parameter-efficient tuning LoRA, rank 8, bfloat16
Repository code Custom Baichuan modeling and tokenization code
Model-card revision 11 July 2026

The configuration files specify BaichuanForCausalLM, a 4,096-token maximum context length, bfloat16 weights, 32 transformer layers, 32 attention heads, and a hidden size of 4,096. Because this repository includes custom model and tokenizer code, loading requires trust_remote_code=True. Users should inspect the repository code before enabling remote code execution.

Intended uses

Appropriate research uses include:

  • studying domain adaptation and supervised fine-tuning for medical language models;
  • developing human-supervised prostate cancer education prototypes;
  • drafting non-final educational content for expert review;
  • evaluating evidence-grounded generation and retrieval-augmented generation workflows;
  • studying bilingual communication concerning lifestyle management; and
  • comparing model outputs under controlled research protocols.

All generated content should be treated as a draft requiring evidence verification and professional review.

Out-of-scope uses

Do not use this model for:

  • diagnosis, prognosis, staging, or treatment selection;
  • prescribing, dosing, stopping, or changing medications;
  • replacing oncologists, urologists, nurses, pharmacists, dietitians, psychologists, or other qualified professionals;
  • emergency advice or triage;
  • direct-to-patient deployment without continuous human oversight;
  • generating definitive clinical recommendations from model weights alone;
  • high-stakes decisions involving an individual patient;
  • use as an authoritative clinical guideline; or
  • any unlawful, deceptive, discriminatory, or harmful activity.

Training data

Evidence corpus

The documented development corpus covered February 2015 to February 2025 and comprised 2,211 peer-reviewed publications related to prostate cancer lifestyle management:

Source type Number
Original research articles 1,516
Review articles 695
Total 2,211

The literature corpus was processed into more than 150,000 knowledge chunks for evidence organization and retrieval experiments. BGE-M3 embeddings and a FAISS vector store were used in the associated retrieval workflow.

Clinical guideline text was not used as training text. The model therefore must not be assumed to reproduce current guideline recommendations. Users should independently consult current professional guidelines and primary evidence.

Instruction data

Component Size Description
Single-turn questionโ€“answer pairs 42,330 Bilingual patient-oriented and knowledge-oriented exchanges grounded in the literature-derived knowledge base
Multi-turn conversations 3,008 Context-dependent conversations designed to simulate follow-up questions across lifestyle-management scenarios

In this model card, the instruction data are consistently referred to as the PCaPLMM-SFT instruction dataset.

The five main content domains were diet and nutrition, physical activity, weight management, medication or treatment adherence, and psychological or psychosocial support.

Data generation and quality control

The documented data-development pipeline included:

  1. literature retrieval and eligibility screening;
  2. document normalization and evidence chunking;
  3. semantic embedding with BGE-M3 and storage in FAISS;
  4. evidence-conditioned question and answer generation;
  5. formatting, terminology, duplication, consistency, and safety checks;
  6. similarity-based deduplication;
  7. grouped splitting at the question-group level to reduce information leakage; and
  8. stratified human quality review.

Most synthetic questionโ€“answer generation used Qwen3-Turbo. Consequently, the instruction data may inherit generator-specific stylistic, factual, and safety-expression biases. A total of 2,400 generated samples underwent human quality review. This audit sample should not be interpreted as proof that the remaining data or model outputs are error-free.

The source publications, generated instruction data, exclusion logs, and quality-control annotations are not distributed in this model repository. Their absence limits independent auditing and exact reconstruction.

Limitations and known risks

Knowledge and temporal limitations

  • The documented evidence corpus ended in February 2025. The model may not reflect evidence, safety communications, drug information, or guidelines published after that date.
  • The model does not dynamically retrieve new evidence unless integrated into an external retrieval system.
  • Published literature can contain bias, reporting errors, contradictory findings, and limited population coverage.
  • Review articles and original studies were included, but guideline text was not used as training text.

Generation limitations

  • The model can hallucinate references, statistics, mechanisms, contraindications, or recommendations.
  • It may present uncertain evidence with unjustified confidence.
  • It may fail to distinguish population-level associations from individual clinical advice.
  • It may generate generic recommendations that do not account for cancer stage, treatment modality, comorbidities, frailty, culture, access, or patient preferences.
  • It may inconsistently communicate uncertainty, contraindications, and thresholds for professional referral.
  • Output quality may differ between Chinese and English and across prompt styles.
  • The model may reproduce biases from the base model, publication corpus, synthetic-data generator, and human reviewers.

Retrieval limitations

The associated study used a retrieval-augmented workflow with BGE-M3 embeddings, FAISS, and a top-k value of 20. Those components are not bundled here. Running the released model without retrieval should not be described as evidence-grounded generation. Even with retrieval, users must verify that the retrieved evidence is relevant, current, and correctly interpreted.

Safety limitations

The model was not prospectively evaluated in real patients, clinical workflows, or randomized implementation studies. It should not be exposed directly to patients without an institutionally approved protocol, privacy safeguards, continuous professional oversight, output logging, and a clear escalation pathway.

How to use

Installation

A reproducible starting environment is:

pip install "torch>=2.0" "transformers==4.48.3" accelerate sentencepiece safetensors

The repository contains custom code. Review configuration_baichuan.py, modeling_baichuan.py, tokenization_baichuan.py, generation_utils.py, and quantizer.py before setting trust_remote_code=True.

Basic chat inference

import torch
from transformers import (
    AutoModelForCausalLM,
    AutoTokenizer,
    GenerationConfig,
)

MODEL_ID = "RomilY/PCaPLMM_SFT"

tokenizer = AutoTokenizer.from_pretrained(
    MODEL_ID,
    use_fast=False,
    trust_remote_code=True,
)

model_kwargs = {
    "trust_remote_code": True,
    "torch_dtype": torch.bfloat16 if torch.cuda.is_available() else torch.float32,
}

if torch.cuda.is_available():
    model_kwargs["device_map"] = "auto"

model = AutoModelForCausalLM.from_pretrained(
    MODEL_ID,
    **model_kwargs,
)
model.generation_config = GenerationConfig.from_pretrained(MODEL_ID)
model.eval()

messages = [
    {
        "role": "user",
        "content": (
            "ๅ‰ๅˆ—่…บ็™Œๆ‚ฃ่€…ๅœจๅผ€ๅง‹ๆ–ฐ็š„่ฟๅŠจ่ฎกๅˆ’ๅ‰๏ผŒ้œ€่ฆ่€ƒ่™‘ๅ“ชไบ›ๅ› ็ด ๏ผŸ"
            "่ฏทๅŒบๅˆ†ไธ€่ˆฌๅฅๅบทๆ•™่‚ฒไธŽๅฟ…้กปๅ’จ่ฏขไธดๅบŠๅŒป็”Ÿ็š„ๆƒ…ๅ†ตใ€‚"
        ),
    }
]

with torch.inference_mode():
    response = model.chat(tokenizer, messages)

print(response)

Multi-turn inference

messages = [
    {
        "role": "user",
        "content": "ๅ‰ๅˆ—่…บ็™Œๆฒป็–—ๆœŸ้—ด๏ผŒๆ€Žๆ ทๅˆถๅฎš่พƒๅฎ‰ๅ…จ็š„ๆ—ฅๅธธๆดปๅŠจ่ฎกๅˆ’๏ผŸ",
    }
]

with torch.inference_mode():
    first_response = model.chat(tokenizer, messages)

messages.append({"role": "assistant", "content": first_response})
messages.append(
    {
        "role": "user",
        "content": "ๅฆ‚ๆžœๆ‚ฃ่€…ๅŒๆ—ถๅญ˜ๅœจ้ชจ่ฝฌ็งป้ฃŽ้™ฉ๏ผŒๅ“ชไบ›ๅปบ่ฎฎไธ่ƒฝ็›ดๆŽฅ็…งๆฌ๏ผŸ",
    }
)

with torch.inference_mode():
    second_response = model.chat(tokenizer, messages)

print(second_response)

Download with Git

The repository contains approximately 15 GB of model files.

git lfs install
git clone https://huggingface.co/RomilY/PCaPLMM_SFT

Generation configuration

The repository's default generation_config.json specifies:

Parameter Default
do_sample true
temperature 0.3
top_p 0.85
top_k 5
repetition_penalty 1.05
max_new_tokens 2048

These values are release defaults rather than clinically validated settings. For research requiring greater repeatability, explicitly set a random seed and document all generation parameters. Low-temperature decoding does not eliminate hallucinations.

Hardware considerations

The sharded bfloat16 weights occupy approximately 15 GB on disk. Runtime memory also includes model-loading overhead, activations, the keyโ€“value cache, and framework allocations. Hardware requirements therefore depend on input length, output length, batch size, precision, and device mapping. CPU inference is possible in principle but may be slow. The repository does not provide a validated quantized release.

Repository contents

The current release includes the following principal files:

PCaPLMM_SFT/
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ config.json
โ”œโ”€โ”€ configuration.json
โ”œโ”€โ”€ configuration_baichuan.py
โ”œโ”€โ”€ generation_config.json
โ”œโ”€โ”€ generation_utils.py
โ”œโ”€โ”€ model-00001-of-00004.safetensors
โ”œโ”€โ”€ model-00002-of-00004.safetensors
โ”œโ”€โ”€ model-00003-of-00004.safetensors
โ”œโ”€โ”€ model-00004-of-00004.safetensors
โ”œโ”€โ”€ model.safetensors.index.json
โ”œโ”€โ”€ modeling_baichuan.py
โ”œโ”€โ”€ Modelfile
โ”œโ”€โ”€ quantizer.py
โ”œโ”€โ”€ special_tokens_map.json
โ”œโ”€โ”€ tokenization_baichuan.py
โ”œโ”€โ”€ tokenizer.model
โ””โ”€โ”€ tokenizer_config.json

Responsible-use recommendations

Research deployments should, at minimum:

  1. use retrieval from current and curated evidence rather than relying only on parametric memory;
  2. retain source metadata and display evidence provenance;
  3. require human review before any content reaches patients;
  4. implement checks for unsupported claims, medication advice, contraindications, and emergency symptoms;
  5. preserve prompts, retrieved passages, model versions, generation settings, and reviewer decisions for audit;
  6. conduct subgroup and language-specific evaluation;
  7. prohibit the entry of identifiable patient information unless an approved privacy and security framework is in place; and
  8. define a process for updating or withdrawing the model when evidence or safety requirements change.

License

This derivative model is subject to the terms applicable to the Baichuan 2 base model. Community use requires compliance with both the Apache License 2.0 and the Baichuan 2 Model Community License. Commercial use may require additional authorization and remains subject to the base model's terms.

Before use or redistribution, review:

Nothing in this model card grants rights beyond those provided by the applicable licenses.

Citation

The associated manuscript citation should replace the provisional repository citation below once the article is publicly available.

@misc{pcaplmm_sft_2026,
  title        = {PCaPLMM-SFT: Prostate Cancer Patient Lifestyle Management Model via Supervised Fine-Tuning},
  author       = {{PCaPLMM-SFT Development Team}},
  year         = {2026},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/RomilY/PCaPLMM_SFT}},
  note         = {Research model; accessed YYYY-MM-DD}
}

Acknowledgements

This work builds on:

Contact

Repository maintainer: Fangyuan Jiang
Email: theromily@gmail.com

For reproducibility questions, suspected safety issues, or documentation corrections, open a discussion in the Hugging Face repository or contact the maintainer.

Change log

Model-card revision โ€” 11 July 2026

  • updated inference examples to use the model's custom Baichuan code and chat interface;
  • corrected the repository description from a standalone LoRA adapter to merged full-model weights;
  • aligned the file tree with the files currently present in the repository;
  • clarified that clinical guideline text was not used as training text;
  • added intended-use, out-of-scope-use, limitation, bias, safety, licensing, and reproducibility sections; and
  • added Hugging Face metadata for task, library, languages, base model, license, and discoverability.
Downloads last month
65
Safetensors
Model size
8B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for RomilY/PCaPLMM_SFT

Adapter
(7)
this model