Instructions to use pymlex/Qwen2.5-0.5B-Human with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pymlex/Qwen2.5-0.5B-Human with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pymlex/Qwen2.5-0.5B-Human") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("pymlex/Qwen2.5-0.5B-Human") model = AutoModelForMultimodalLM.from_pretrained("pymlex/Qwen2.5-0.5B-Human") 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 pymlex/Qwen2.5-0.5B-Human with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pymlex/Qwen2.5-0.5B-Human" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pymlex/Qwen2.5-0.5B-Human", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/pymlex/Qwen2.5-0.5B-Human
- SGLang
How to use pymlex/Qwen2.5-0.5B-Human 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 "pymlex/Qwen2.5-0.5B-Human" \ --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": "pymlex/Qwen2.5-0.5B-Human", "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 "pymlex/Qwen2.5-0.5B-Human" \ --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": "pymlex/Qwen2.5-0.5B-Human", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use pymlex/Qwen2.5-0.5B-Human with Docker Model Runner:
docker model run hf.co/pymlex/Qwen2.5-0.5B-Human
Qwen2.5-0.5B-Human
DPO fine-tune of Qwen/Qwen2.5-0.5B-Instruct that paraphrases Spanish academic abstracts to reduce AI-detection scores from danibor/oculus-v2.0-multilingual.
Overview
Preference pairs for optimisation come from pymlex/ai-generated-texts. The corpus is Flaglab/academic-knowledge-abstracts-es. For each train abstract, two base-model paraphrases are ranked by Oculus logit. DPO with beta = 0.1 increases the relative log-probability of the lower-logit completion. Retained pairs: 6396 from 8891 train abstracts with absolute logit gap at least 1.
Evaluation setup
Hardware: NVIDIA RTX 5090, Ubuntu Jupyter, CUDA 13.0+, bf16 training and inference. Post-training evaluation generates one paraphrase per validation and test abstract with the base and fine-tuned models, scores each output with Oculus, and treats label 1 as AI-generated at threshold 0.5 on detector probability.
During DPO, mean validation AI probability on a 276-text subset moved from 0.6740 at step 0 to 0.2437 at the last monitor step (-0.4303).
Results
| Model | Split | n | mean prob | mean logit | accuracy | MCC | ROC-AUC | F1 |
|---|---|---|---|---|---|---|---|---|
| base | validation | 1107 | 0.6550 | 1.4619 | 0.6712 | 0.0000 | n/a | 0.8032 |
| base | test | 1112 | 0.6532 | 1.5581 | 0.6655 | 0.0000 | n/a | 0.7991 |
| fine-tuned | validation | 1107 | 0.2264 | -2.0100 | 0.1716 | 0.0000 | n/a | 0.2930 |
| fine-tuned | test | 1112 | 0.2391 | -1.8733 | 0.1835 | 0.0000 | n/a | 0.3100 |
Lower mean probability and MCC near zero indicate weaker detector response on model paraphrases under the AI-positive labelling convention.
Source code
The full pipeline is published on GitHub.
Citation
If you found this model useful, please cite it as:
@misc{zyukov2026qwenhuman,
title = {{Qwen2.5-0.5B-Human: DPO fine-tune against Oculus detector}},
author = {Zyukov, Alex},
year = {2026},
url = {https://huggingface.co/pymlex/Qwen2.5-0.5B-Human}
}
@misc{zyukov2026aitexttricking,
title = {{DPO Fine-Tuning Against Multilingual AI Text Detectors}},
author = {Zyukov, Alex},
year = {2026},
url = {https://github.com/pymlex/ai-text-detector-tricking},
publisher = {GitHub},
organization = {pymlex}
}
@misc{nicks2024detectors,
title = {{Language Model Detectors Are Easily Optimized Against}},
author = {Nicks, Cameron and Chua, Jeremy and Liu, Stephen and others},
year = {2024},
eprint = {2406.07490},
archivePrefix = {arXiv},
primaryClass = {cs.CL},
url = {https://arxiv.org/abs/2406.07490}
}
@misc{oculus2026,
title = {{Oculus 2.0 Multilingual AI Text Detector}},
author = {danibor},
year = {2026},
url = {https://huggingface.co/danibor/oculus-v2.0-multilingual}
}
@misc{flaglab2025abstracts,
title = {{Academic Knowledge Abstracts Spanish}},
author = {Flaglab},
year = {2025},
url = {https://huggingface.co/datasets/Flaglab/academic-knowledge-abstracts-es}
}
The project is under GPL-3.0 license.
- Downloads last month
- 241


