Text Generation
Transformers
Safetensors
qwen2
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use ZhishanQ/QuCo-extractor-0.5B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ZhishanQ/QuCo-extractor-0.5B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ZhishanQ/QuCo-extractor-0.5B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ZhishanQ/QuCo-extractor-0.5B") model = AutoModelForCausalLM.from_pretrained("ZhishanQ/QuCo-extractor-0.5B", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ZhishanQ/QuCo-extractor-0.5B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ZhishanQ/QuCo-extractor-0.5B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ZhishanQ/QuCo-extractor-0.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ZhishanQ/QuCo-extractor-0.5B
- SGLang
How to use ZhishanQ/QuCo-extractor-0.5B 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 "ZhishanQ/QuCo-extractor-0.5B" \ --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": "ZhishanQ/QuCo-extractor-0.5B", "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 "ZhishanQ/QuCo-extractor-0.5B" \ --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": "ZhishanQ/QuCo-extractor-0.5B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ZhishanQ/QuCo-extractor-0.5B with Docker Model Runner:
docker model run hf.co/ZhishanQ/QuCo-extractor-0.5B
Update README.md
Browse files
README.md
CHANGED
|
@@ -14,23 +14,24 @@ model-index:
|
|
| 14 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 15 |
should probably proofread and complete it, then remove this comment. -->
|
| 16 |
|
| 17 |
-
#
|
| 18 |
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
|
| 23 |
-
## Model
|
| 24 |
|
| 25 |
-
|
| 26 |
|
| 27 |
-
|
| 28 |
|
| 29 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
-
## Training and evaluation data
|
| 32 |
-
|
| 33 |
-
More information needed
|
| 34 |
|
| 35 |
## Training procedure
|
| 36 |
|
|
@@ -49,15 +50,6 @@ The following hyperparameters were used during training:
|
|
| 49 |
- lr_scheduler_warmup_ratio: 0.1
|
| 50 |
- num_epochs: 2.0
|
| 51 |
|
| 52 |
-
### Training results
|
| 53 |
-
|
| 54 |
-
| Training Loss | Epoch | Step | Validation Loss |
|
| 55 |
-
|:-------------:|:------:|:----:|:---------------:|
|
| 56 |
-
| 0.0486 | 0.4240 | 300 | 0.0476 |
|
| 57 |
-
| 0.04 | 0.8481 | 600 | 0.0403 |
|
| 58 |
-
| 0.0221 | 1.2714 | 900 | 0.0397 |
|
| 59 |
-
| 0.0216 | 1.6954 | 1200 | 0.0378 |
|
| 60 |
-
|
| 61 |
|
| 62 |
### Framework versions
|
| 63 |
|
|
|
|
| 14 |
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 15 |
should probably proofread and complete it, then remove this comment. -->
|
| 16 |
|
| 17 |
+
# QuCo-extractor-0.5B
|
| 18 |
|
| 19 |
+
[](https://arxiv.org/abs/2512.19134)
|
| 20 |
+
[](https://github.com/ZhishanQ/QuCo-RAG)
|
| 21 |
+
[](https://github.com/ZhishanQ/QuCo-RAG/blob/main/LICENSE)
|
| 22 |
|
| 23 |
+
## Model Description
|
| 24 |
|
| 25 |
+
**QuCo-extractor-0.5B** is a specialized entity extraction model fine-tuned from [Qwen2.5-0.5B-Instruct](https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct) for the **QuCo-RAG** system. This model extracts knowledge triples (entity-relation-entity) from sentences to support corpus-grounded uncertainty quantification in Retrieval-Augmented Generation.
|
| 26 |
|
| 27 |
+
This model is part of the QuCo-RAG project presented in:
|
| 28 |
|
| 29 |
+
> **QuCo-RAG: Quantifying Uncertainty from the Pre-training Corpus for Dynamic Retrieval-Augmented Generation**
|
| 30 |
+
>
|
| 31 |
+
> Dehai Min, Kailin Zhang, Tongtong Wu, Lu Cheng
|
| 32 |
+
>
|
| 33 |
+
> [[Paper]](https://arxiv.org/abs/2512.19134) [[Code]](https://github.com/ZhishanQ/QuCo-RAG)
|
| 34 |
|
|
|
|
|
|
|
|
|
|
| 35 |
|
| 36 |
## Training procedure
|
| 37 |
|
|
|
|
| 50 |
- lr_scheduler_warmup_ratio: 0.1
|
| 51 |
- num_epochs: 2.0
|
| 52 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
### Framework versions
|
| 55 |
|