Instructions to use ming9999/ATLAS-Qwen2.5-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ming9999/ATLAS-Qwen2.5-7B with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-7B") model = PeftModel.from_pretrained(base_model, "ming9999/ATLAS-Qwen2.5-7B") - Notebooks
- Google Colab
- Kaggle
ATLAS (Qwen2.5-7B)
ATLAS attributes a machine-written document to the model family that wrote it: gpt,
claude, gemini, mistral or llama.
It fine-tunes Qwen2.5-7B with LoRA together with one learned control embedding per source. Each source also has its own LoRA up-projection. At test time the document is scored once under each source's control embedding, and the source under which it is most likely is predicted.
Code: https://github.com/komseok0109/ATLAS
Files
| file | contents |
|---|---|
adapter_model.safetensors, adapter_config.json |
the LoRA adapter on Qwen/Qwen2.5-7B |
atlas_extra.pt |
the control embeddings and the per-source LoRA up-projections |
hyperparams.json |
the training configuration |
atlas_extra.pt is required. Loading the adapter alone with PeftModel.from_pretrained gives
a model without the per-source weights, so use the loader in the code repository.
Usage
git clone https://github.com/komseok0109/ATLAS && cd ATLAS
pip install -r requirements.txt
hf download ming9999/ATLAS-Qwen2.5-7B --local-dir checkpoints/atlas
import sys; sys.path.insert(0, "src/atlas"); sys.path.insert(0, "src")
import torch
from model import ATLASModel
from utils.dataset import make_collate
sources = ["gpt", "claude", "gemini", "mistral", "llama"]
model = ATLASModel("Qwen/Qwen2.5-7B", sources, per_source_lora_b=True)
model.load_weights("checkpoints/atlas")
model = model.to("cuda").eval()
text = "..."
seq, attn, _, _ = make_collate(model.tokenizer, 512)([{"text": text, "label": 0}])
scores = model.get_score_vectors(seq.cuda(), attn.cuda(), prod_temps=(1, 2, 4, 8)) # [1, 5, 5]
pred = scores[0, :, 1:].mean(-1).argmax().item() # argmax-prod
print(sources[pred])
Column 0 of scores is the mean token log-probability under each source (the argmax
readout); columns 1-4 are the argmax-prod readout at temperatures 1, 2, 4 and 8, which are
averaged before taking the argmax.
Training
Trained for 5 epochs (effective batch size 128, learning rate 1e-4, LoRA rank 16 on the attention projections, maximum length 512 tokens) on machine-written text from five model families. Besides the training versions of MAABench (gpt-5, claude-opus-4.6, gemini-2.5-flash, Mistral-Small-2501, Llama-3-70B), each family contributes text from three newer versions:
| family | versions |
|---|---|
| gpt | gpt-5, gpt-5.2, gpt-5.4, gpt-5.6-terra |
| claude | claude-opus-4.6, 4.7, 4.8, claude-opus-5 |
| gemini | gemini-2.5-flash, 3-flash-preview, 3.5-flash, 3.6-flash |
| mistral | Mistral-Small-2501, 3.1, 3.2, mistral-small-2603 |
| llama | Llama-3-70B, 3.1-70B, 3.3-70B, Llama-4-Scout |
Benchmark: https://huggingface.co/datasets/ming9999/maabench
- Downloads last month
- 87
Model tree for ming9999/ATLAS-Qwen2.5-7B
Base model
Qwen/Qwen2.5-7B