Instructions to use nicolay-r/qwen25-05b-multiclinsum-standard with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nicolay-r/qwen25-05b-multiclinsum-standard with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nicolay-r/qwen25-05b-multiclinsum-standard") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nicolay-r/qwen25-05b-multiclinsum-standard") model = AutoModelForCausalLM.from_pretrained("nicolay-r/qwen25-05b-multiclinsum-standard", 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 nicolay-r/qwen25-05b-multiclinsum-standard with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nicolay-r/qwen25-05b-multiclinsum-standard" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nicolay-r/qwen25-05b-multiclinsum-standard", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nicolay-r/qwen25-05b-multiclinsum-standard
- SGLang
How to use nicolay-r/qwen25-05b-multiclinsum-standard 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 "nicolay-r/qwen25-05b-multiclinsum-standard" \ --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": "nicolay-r/qwen25-05b-multiclinsum-standard", "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 "nicolay-r/qwen25-05b-multiclinsum-standard" \ --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": "nicolay-r/qwen25-05b-multiclinsum-standard", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use nicolay-r/qwen25-05b-multiclinsum-standard with Docker Model Runner:
docker model run hf.co/nicolay-r/qwen25-05b-multiclinsum-standard
Model Details
Update 13'th July 2025: Added video review on youtube
This model represent a fine-tuned version of Qwen/Qwen2.5-0.5B-Instruct on MultiClinSum training data
for BioASQ-2025 Workshop / CLEF 2025.
This model represent a baseline for the distil version:
https://huggingface.co/nicolay-r/qwen25-05b-multiclinsum-distil
Video Overview
Model Description
- Model type: Decoder-based Model
- Language(s) (NLP): Supported by Qwen2.5 + fine-tuned on summarries written in
en,fr,pt,es - License: MIT
- Finetuned from model [optional]: https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct
Model Sources [optional]
- Repository: https://github.com/nicolay-r/distil-tuning-llm
- Paper: TBA
- Demo: https://colab.research.google.com/drive/1TXGaz39o73nBucEQw12gbad7Tw11j2Ol?usp=sharing
Usage
We use bulk-chain for inference with the Qwen2 provider based on transformers pipelines API.
Provider huggingface_qwen.py: https://github.com/nicolay-r/nlp-thirdgate/blob/9e46629792e9a53871710884f7b9e2fe42666aa7/llm/transformers_qwen2.py
from bulk_chain.api import iter_content
from bulk_chain.core.utils import dynamic_init
content_it = iter_content(
schema={"schema": [
{"prompt": "Summarize: {input}", "out": "summary"}]
},
llm=dynamic_init(
class_filepath="huggingface_qwen.py",
class_name="Qwen2")(
api_token="YOUR_HF_API_KEY_GOES_HERE",
model_name="nicolay-r/qwen25-05b-multiclinsum-standard",
temp=0.1,
use_bf16=True,
max_new_tokens=args.max_tokens,
device=args.device
),
infer_mode="batch",
batch_size=4,
return_mode="record",
# INPUT TEXTS:
input_dicts_it=[
{"input": "A patient 62 years old with ..."}
],
)
for record in content_it:
# here is the result dictionary that includes summary.
print(record["summary"])
Training Details
Training Data
- MultiClinSum
- We use the following script for downloading datasets.
- Web: https://temu.bsc.es/multiclinsum
- Data: https://zenodo.org/records/15463353
- BioASQ: http://bioasq.org/
Training Procedure
The training procedure involves:
- Preparation of the
rationalefor summaries distillation. - Launch of the fine-tuning process.
Fine-tuning: Please follow this script for using MultiClinSum dataset for fine-tuning at GoogleColab A100 (40GB VRAM) + 80GB RAM:
Preprocessing [optional]
Refer to the following script for the fine-tuning pre-processing:
Training Hyperparameters
We refer to the original parameters here:
- https://github.com/QwenLM/Qwen2.5-VL/tree/main/qwen-vl-finetune And use the following script:
- https://github.com/nicolay-r/distil-tuning-llm/blob/master/distil_ft_qwen25_05b_A100-40GB_80GB_std.sh
Speeds, Sizes, Times [optional]
The fine-tuning procedure for 3 epochs takes around ~1 hour using the GoogleColab A100.
Evaluation
Testing Data
We use evaluation split of the 20 documents out of the small portion the available training data across all the languages: en, fr, pt, es
Metrics
In this evaluation we use onle rouge score.
Results
We launch 3 individual fine-tuning processes for distil and standard versions to showcase results variation among multiple runs.
Figure: the obtained results for this model correspond to the
standardversion ðŸŸ
Summary
Hardware
We experiment with model inference and launching using GoolgeColab Notebook service and related resources:
- Fine-tuning: A100 (40GB)
- Inference: T4 (16GB)
Follow the Google Codalab Notebook at the repository:
Software
This is an official repository for this card:
Citation [optional]
BibTeX:
TO BE ADDED
Model Card Authors
Nicolay Rusnachenko
- Downloads last month
- 10
