Downloads · 30 days
0
RUBRIC13/ai-detector-ensemble
ai-detector-ensemble is a machine learning model from RUBRIC13. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository backs one protected Hugging Face Dedicated Inference Endpoint: RUBRIC13/ai-detector-ensemble. The endpoint keeps the three detectors and the Mistral rewriter resident in one GPU process. It does not us…
Downloads · 30 days
0
Access
Public
Updated Aug 19, 2026
Repo size
—
Likes
0
Public
Click a slice to open those files.
.py74.2 KB · 80%
From the Hugging Face model README
This repository backs one protected Hugging Face Dedicated Inference Endpoint:
RUBRIC13/ai-detector-ensemble. The endpoint keeps the three detectors and the
Mistral rewriter resident in one GPU process. It does not use Gradio or an
external inference API.
Requests without task remain detector requests for compatibility with the
existing Lovable integration. Set task: "rewrite" to use the resident
rewriter; both operations use the same URL, GPU, wake-up, and authentication.
{
"inputs": "Full document text"
}
The equivalent explicit form is { "task": "detect", "inputs": "..." }.
{
"task": "rewrite",
"inputs": "Text to rewrite",
"strength": "medium",
"num_candidates": 3
}
The response is:
{
"candidates": [
"candidate one",
"candidate two",
"candidate three"
]
}
All candidates are generated sequentially in one request. Long rewrites are chunked by paragraph, sentence, and finally tokenizer windows of approximately 450 source tokens. Each candidate rewrites the complete document independently; chunks from different candidates are never mixed and source text is never silently truncated.
The resident rewriter uses:
mistralai/Mistral-7B-Instruct-v0.3, revision
c170c708c41dac9275d15a8fff4eca08d52bab71txmedai/humanizer-mistral7b-lora, pinned to
f4f9aab7e5e360c4b40e1d565dba486b6fe0b7d4device_map="auto"The requested alias txmedai/humanizer-mistral7b-lora-v1 is not currently
resolvable through the Hub API; the public parent repository's immutable v1
commit is used instead. This is v1, not v2 or v3.
Run local tests with:
python -m unittest discover -s tests -v
{
"inputs": "Text to analyze"
}
{
"document": {
"ai_likelihood": 68.42,
"model_scores": {
"deberta": 61.2,
"vanguard": 70.31,
"qwen3": 73.75
}
},
"sentences": [
{
"index": 0,
"text": "Text to analyze.",
"start": 0,
"end": 16,
"ai_likelihood": 68.42,
"model_scores": {
"deberta": 61.2,
"vanguard": 70.31,
"qwen3": 73.75
},
"low_confidence": true
}
},
"ensemble_method": "equal_weight_average",
"calibrated": false,
"version": "1.1"
}
Internally every score is normalized from 0.0 human-like to 1.0 AI-like. The API returns percentages from 0.0 to 100.0. The document score continues to use independent tokenizer-aware document chunks and is not calculated from sentence scores. Each sentence is scored independently by all three resident models, with safe micro-batching of four sentence chunks by default. Sentence segmentation preserves source text and returns offsets. Sentences with fewer than 8 word-like information tokens are returned with low_confidence: true; they are not discarded or numerically reweighted.
abhi099k/ai-text-detector-v-n4.0 — DeBERTa-v3-large fine-tune, class 1 is AI.ShantanuT01/vanguard-ai-text-detector — ModernBERT-large, one output logit mapped with sigmoid as the model card's P(AI).rasbt/ai-text-detector-qwen3-0.6b-variable — Qwen3 sequence classifier, class 1 is AI. It uses a variable-position <|im_end|> readout and temperature scaling of 1.4665638128271772 before softmax.The exact revisions, current configs, tokenizer settings, detector-specific Qwen3 metadata, scoring mappings, and licenses are recorded in MODEL_VERIFICATION.md.
The current published terms are permissive for the three selected model repositories: DeBERTa MIT metadata, Vanguard MIT metadata, and Qwen3 detector Apache-2.0. The Qwen3 base model is also published under Apache-2.0. Preserve the license files and notices when distributing a production system.
The runtime pins Transformers 4.57.3. This version supports all three verified architectures while avoiding an eager torchaudio import in the endpoint base image; the model metadata itself was independently verified from the Hub and reports Transformers 5.14.1.
handler.py — Hugging Face Custom Handler, resident detector/rewrite model
loading, task routing, Qwen3 readout, chunking, sentence segmentation,
batching, mappings, and response formatting.sitecustomize.py — disables discovery of an incompatible optional torchaudio wheel in the text-only endpoint worker before Transformers imports it.requirements.txt — runtime dependencies installed by Inference Endpoints.tests/test_handler.py — automated tests for mappings, Qwen3 temperature/readout behavior, chunk coverage, sentence segmentation, offsets, confidence flags, batching, schema, failure handling, malformed input, and secret hygiene.scripts/verify_models.py — checks pinned Hub revisions/configs before upload or deployment.scripts/upload_repo.py — uploads this folder using an environment token only.scripts/create_endpoint.py — guarded creation of one protected endpoint, min replicas 0 and max replicas 1.scripts/wait_for_endpoint.py — waits for the endpoint to become ready.scripts/live_smoke_tests.py — authenticated document/sentence, offset, long-text, and malformed-input checks.DEPLOYMENT_REPORT.md — deployment status, hardware, tests, costs, revisions, and limitations..hf-deploy-token is gitignored and must never be committed. Upload and endpoint scripts refuse to run without authentication. The endpoint is protected, so requests require a Hugging Face bearer token.