Instructions to use ximeng2639/care-opd-qzbc-4b-final with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ximeng2639/care-opd-qzbc-4b-final with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ximeng2639/care-opd-qzbc-4b-final") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ximeng2639/care-opd-qzbc-4b-final") model = AutoModelForCausalLM.from_pretrained("ximeng2639/care-opd-qzbc-4b-final", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ximeng2639/care-opd-qzbc-4b-final with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ximeng2639/care-opd-qzbc-4b-final" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ximeng2639/care-opd-qzbc-4b-final", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ximeng2639/care-opd-qzbc-4b-final
- SGLang
How to use ximeng2639/care-opd-qzbc-4b-final with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ximeng2639/care-opd-qzbc-4b-final" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ximeng2639/care-opd-qzbc-4b-final", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ximeng2639/care-opd-qzbc-4b-final" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ximeng2639/care-opd-qzbc-4b-final", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ximeng2639/care-opd-qzbc-4b-final with Docker Model Runner:
docker model run hf.co/ximeng2639/care-opd-qzbc-4b-final
CARE-OPD QZBC 4B
CARE-OPD QZBC 4B is a text-only Qwen3.5-4B checkpoint adapted for evidence-bound structured response generation. The LoRA training adapters have already been merged, so this repository contains a standalone Transformers checkpoint.
What the model does
The model accepts chat messages containing an Evidence Packet and produces a
structured GeneratedResponse. CARE-OPD training uses verifier-identified
semantic repair regions, teacher supervision on those regions, retention on
unaffected regions, and repeated recollection of failures from the updated
student. The verifier, teacher, retrieval system, and host Agent are training or
application-side components and are not embedded in this checkpoint.
Intended use
- Research on evidence-grounded and structured response generation.
- Reproduction of the QZBC evaluation contract with the matching prompt, schema validator, source-boundary checks, and human review.
- Controlled study of model behavior under missing, conflicting, or unreliable evidence states.
Out-of-scope and safety notice
This model is not a medical device and must not be used as an autonomous diagnostic, prescribing, dosing, triage, or emergency-response system. It does not replace qualified professionals. The checkpoint alone does not provide the host verifier, retrieval policy, source validation, or clinical safeguards. Outputs can be incorrect, unsupported, incomplete, or overly confident.
The strongest evaluations concern the QZBC contract and controlled evidence perturbations. They do not establish clinical validity, patient benefit, general out-of-domain robustness, or end-to-end Agent/tool-routing safety.
Loading
from transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "YOUR_NAMESPACE/care-opd-qzbc-4b-final"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForCausalLM.from_pretrained(
repo_id,
torch_dtype="auto",
device_map="auto",
)
messages = [
{"role": "user", "content": "请仅依据给定 Evidence Packet 作答。"},
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, do_sample=False, max_new_tokens=512)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
The exported configuration records Transformers 5.14.1. Use a Transformers
release that supports the qwen3_5_text architecture.
Technical details
- Architecture:
Qwen3_5ForCausalLM - Parameters: approximately 4.206B
- Weight dtype: bfloat16
- Upstream model:
Qwen/Qwen3.5-4B - Adaptation: merged CARE-OPD LoRA checkpoint
- Serialization: sharded safetensors with a standard
model.safetensors.index.json - Original monolithic weight SHA-256:
87670f85af0db2abf466623ef5fcc2e4f1ac727aa07a2e58c2b15ff246a09fc4 - Formal evaluation model fingerprint:
4cf77e31795163f32fa4e6715d42d06fec88ff98801b154934795b98281ecdcd
The exact immutable revision of the upstream base model was not retained in the export metadata and is therefore reported as unknown rather than guessed.
Training data and privacy
The checkpoint was trained on QZBC-formatted data and controlled evidence-state variants. Before making this repository public, the publisher must independently confirm that all training data are synthetic or properly de-identified, contain no PHI/PII or secrets, and are authorized for redistribution through model weights. No raw training examples are included in this release directory.
Evaluation summary
On the family-clean QZBC perturbed track, the formal CARE-OPD checkpoint reached 80.51% task success (2,355/2,925). Public benchmark results primarily support competitive capability retention rather than universal superiority. These figures are task-specific and should not be interpreted as clinical accuracy.
Known limitations
- The largest QZBC gain is concentrated in the source-outage condition; evidence-conflict handling remains a major limitation.
- Host-side verification and source-boundary enforcement remain necessary.
- Evidence is strongest in-domain; broad OOD, multilingual, demographic, and clinical validation are incomplete.
- The tokenizer includes upstream multimodal special tokens, but this release is a text checkpoint and does not include a vision/audio encoder or processor.
License and attribution
This derivative checkpoint is distributed under the included Apache License
2.0 text, subject to the publisher's confirmation of all upstream and training
data rights. It is based on Qwen/Qwen3.5-4B and has been modified through
CARE-OPD fine-tuning and adapter merging.
- Downloads last month
- 331