Instructions to use yctao/AutoPCR_entitylinker with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use yctao/AutoPCR_entitylinker with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("/nfs/turbo/umms-drjieliu/usr/yctao/HF_HOME/hub/models--unsloth--Qwen3-30B-A3B-Instruct-2507/snapshots/41d47883cd854ab6d119fb7cba6e9ed3511886e2") model = PeftModel.from_pretrained(base_model, "yctao/AutoPCR_entitylinker") - Transformers
How to use yctao/AutoPCR_entitylinker with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="yctao/AutoPCR_entitylinker") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("yctao/AutoPCR_entitylinker", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use yctao/AutoPCR_entitylinker with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "yctao/AutoPCR_entitylinker" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "yctao/AutoPCR_entitylinker", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/yctao/AutoPCR_entitylinker
- SGLang
How to use yctao/AutoPCR_entitylinker 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 "yctao/AutoPCR_entitylinker" \ --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": "yctao/AutoPCR_entitylinker", "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 "yctao/AutoPCR_entitylinker" \ --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": "yctao/AutoPCR_entitylinker", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Studio new
How to use yctao/AutoPCR_entitylinker with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for yctao/AutoPCR_entitylinker to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for yctao/AutoPCR_entitylinker to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for yctao/AutoPCR_entitylinker to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="yctao/AutoPCR_entitylinker", max_seq_length=2048, ) - Docker Model Runner
How to use yctao/AutoPCR_entitylinker with Docker Model Runner:
docker model run hf.co/yctao/AutoPCR_entitylinker
AutoPCR: Automated Phenotype Concept Recognition by Prompting
AutoPCR is a prompt-based phenotype concept recognition (CR) method designed to automatically generalize to new ontologies and unseen data without ontology-specific training. This repository contains the fine-tuned entity linker component of the system, which is a LoRA adapter for unsloth/Qwen3-30B-A3B-Instruct.
- Repository: https://github.com/yctao7/AutoPCR
- Paper: AutoPCR: Automated Phenotype Concept Recognition by Prompting
Model Description
Phenotype concept recognition (CR) is a fundamental task in biomedical text mining. Existing methods often struggle to generalize across diverse text styles or require extensive ontology-specific training. AutoPCR addresses these limitations by using a prompt-based approach and an optional self-supervised training strategy to achieve robust performance across multiple datasets. This model specifically serves as the entity linker within the pipeline to map extracted phenotype mentions to standard ontologies like HPO and MEDIC.
Usage
For detailed instructions on how to use this model within the AutoPCR framework—including environment setup, dictionary building, indexing, and running evaluation experiments—please refer to the official GitHub repository.
Example command for running HPO evaluation from the source code:
python HPO_evaluation.py --ontology_dict ../dict/HPO -c BIOC-GS -o ../results/bioc-gs.tsv --only_longest
Citation
If you find this work useful, please cite:
BibTeX:
@article{tao2025autopcr,
title={AutoPCR: Automated Phenotype Concept Recognition by Prompting},
author={Tao, Yicheng and Huang, Yuanhao and Wang, Yiqun and Luo, Xin and Liu, Jie},
journal={arXiv preprint arXiv:2507.19315},
year={2025}
}
- Downloads last month
- 2