Text Generation
Transformers
Safetensors
English
nemotron_h
ai-text-detection
prose-provenance
conversational
Instructions to use rishanthrajendhran/ProseLens with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rishanthrajendhran/ProseLens with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rishanthrajendhran/ProseLens") 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("rishanthrajendhran/ProseLens") model = AutoModelForCausalLM.from_pretrained("rishanthrajendhran/ProseLens", 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 rishanthrajendhran/ProseLens with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rishanthrajendhran/ProseLens" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rishanthrajendhran/ProseLens", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/rishanthrajendhran/ProseLens
- SGLang
How to use rishanthrajendhran/ProseLens 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 "rishanthrajendhran/ProseLens" \ --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": "rishanthrajendhran/ProseLens", "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 "rishanthrajendhran/ProseLens" \ --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": "rishanthrajendhran/ProseLens", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use rishanthrajendhran/ProseLens with Docker Model Runner:
docker model run hf.co/rishanthrajendhran/ProseLens
Rename the corpus IdeaLens-1M -> WildOutlines
Browse files- README.md +6 -6
- thresholds.json +1 -1
README.md
CHANGED
|
@@ -10,7 +10,7 @@ tags:
|
|
| 10 |
- ai-text-detection
|
| 11 |
- prose-provenance
|
| 12 |
datasets:
|
| 13 |
-
- rishanthrajendhran/
|
| 14 |
extra_gated_prompt: "Access is granted individually. Please say who you are and what you intend to use the weights for."
|
| 15 |
---
|
| 16 |
|
|
@@ -21,7 +21,7 @@ backbone, training documents and labels, but it reads the raw document text inst
|
|
| 21 |
word-level provenance. It returns P(human), the probability that the document was written by a person.
|
| 22 |
|
| 23 |
ProseLens is `nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16` fine-tuned with LoRA (rank 64) on 1M English web
|
| 24 |
-
documents ([
|
| 25 |
|
| 26 |
## Results
|
| 27 |
|
|
@@ -129,7 +129,7 @@ Scores agree with the training-time scores to about 0.001 in P(human) on average
|
|
| 129 |
|
| 130 |
ProseLens flags a document as AI-written when P(human) is below a cut. Each cut is set so
|
| 131 |
that a given share of human documents is flagged (the false-positive rate, FPR), measured on the 80,000 human
|
| 132 |
-
documents in
|
| 133 |
cut at 1% FPR.
|
| 134 |
|
| 135 |
| FPR | 0.1% | 0.5% | 1% | 2% | 5% |
|
|
@@ -138,7 +138,7 @@ cut at 1% FPR.
|
|
| 138 |
|
| 139 |
Per-format cuts give each format its own operating point. They need the document's format, which the paper
|
| 140 |
assigns with WebOrganizer's annotation prompt run on Gemini 3.7 Flash; the calibration documents use the formats
|
| 141 |
-
recorded in
|
| 142 |
format's own quantile, shrunk toward the global cut with weight n / (n + 2500); at 0.1% FPR 10,000 documents
|
| 143 |
per format are too few, so there is no per-format cut. A document outside these eight formats has no
|
| 144 |
per-format cut; do not fall back to the global cut for it.
|
|
@@ -186,7 +186,7 @@ Inputs of 6,000 tokens do not fit on one 80 GB GPU and 12,000 do not fit on two;
|
|
| 186 |
128 to 64 did not change either limit.
|
| 187 |
|
| 188 |
ProseLens reads whole documents, so their length decides the hardware. One 80 GB GPU handles documents up to about
|
| 189 |
-
4,000 tokens (about 3,000 words); 85% of
|
| 190 |
8,000 tokens (about 6,000 words), which covers all but about 1 in 1,000 test documents. We have not measured longer
|
| 191 |
inputs or more GPUs.
|
| 192 |
|
|
@@ -213,7 +213,7 @@ inputs or more GPUs.
|
|
| 213 |
| [IdeaLens-ModernBERT-L-PerItem](https://huggingface.co/rishanthrajendhran/IdeaLens-ModernBERT-L-PerItem) | ModernBERT-large | single outline items, pooled |
|
| 214 |
| [IdeaLens-LogisticClassifier-PerItem](https://huggingface.co/rishanthrajendhran/IdeaLens-LogisticClassifier-PerItem) | logistic regression over text-embedding-3-large | single outline items, pooled |
|
| 215 |
|
| 216 |
-
Training data: [
|
| 217 |
|
| 218 |
## License
|
| 219 |
|
|
|
|
| 10 |
- ai-text-detection
|
| 11 |
- prose-provenance
|
| 12 |
datasets:
|
| 13 |
+
- rishanthrajendhran/WildOutlines
|
| 14 |
extra_gated_prompt: "Access is granted individually. Please say who you are and what you intend to use the weights for."
|
| 15 |
---
|
| 16 |
|
|
|
|
| 21 |
word-level provenance. It returns P(human), the probability that the document was written by a person.
|
| 22 |
|
| 23 |
ProseLens is `nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16` fine-tuned with LoRA (rank 64) on 1M English web
|
| 24 |
+
documents ([WildOutlines](https://huggingface.co/datasets/rishanthrajendhran/WildOutlines)).
|
| 25 |
|
| 26 |
## Results
|
| 27 |
|
|
|
|
| 129 |
|
| 130 |
ProseLens flags a document as AI-written when P(human) is below a cut. Each cut is set so
|
| 131 |
that a given share of human documents is flagged (the false-positive rate, FPR), measured on the 80,000 human
|
| 132 |
+
documents in WildOutlines's `calibration` split (10,000 per format). The paper's operating point is the global
|
| 133 |
cut at 1% FPR.
|
| 134 |
|
| 135 |
| FPR | 0.1% | 0.5% | 1% | 2% | 5% |
|
|
|
|
| 138 |
|
| 139 |
Per-format cuts give each format its own operating point. They need the document's format, which the paper
|
| 140 |
assigns with WebOrganizer's annotation prompt run on Gemini 3.7 Flash; the calibration documents use the formats
|
| 141 |
+
recorded in WildOutlines. Each is the
|
| 142 |
format's own quantile, shrunk toward the global cut with weight n / (n + 2500); at 0.1% FPR 10,000 documents
|
| 143 |
per format are too few, so there is no per-format cut. A document outside these eight formats has no
|
| 144 |
per-format cut; do not fall back to the global cut for it.
|
|
|
|
| 186 |
128 to 64 did not change either limit.
|
| 187 |
|
| 188 |
ProseLens reads whole documents, so their length decides the hardware. One 80 GB GPU handles documents up to about
|
| 189 |
+
4,000 tokens (about 3,000 words); 85% of WildOutlines's test documents are that short. Two 80 GB GPUs handle up to
|
| 190 |
8,000 tokens (about 6,000 words), which covers all but about 1 in 1,000 test documents. We have not measured longer
|
| 191 |
inputs or more GPUs.
|
| 192 |
|
|
|
|
| 213 |
| [IdeaLens-ModernBERT-L-PerItem](https://huggingface.co/rishanthrajendhran/IdeaLens-ModernBERT-L-PerItem) | ModernBERT-large | single outline items, pooled |
|
| 214 |
| [IdeaLens-LogisticClassifier-PerItem](https://huggingface.co/rishanthrajendhran/IdeaLens-LogisticClassifier-PerItem) | logistic regression over text-embedding-3-large | single outline items, pooled |
|
| 215 |
|
| 216 |
+
Training data: [WildOutlines](https://huggingface.co/datasets/rishanthrajendhran/WildOutlines).
|
| 217 |
|
| 218 |
## License
|
| 219 |
|
thresholds.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
"input": "document",
|
| 4 |
"flag_rule": "flag the document as AI when P(human) < cut",
|
| 5 |
"calibration": {
|
| 6 |
-
"data": "
|
| 7 |
"scores_from": "the training checkpoint, scored on Tinker",
|
| 8 |
"n_humans": 80000,
|
| 9 |
"n_per_format": {
|
|
|
|
| 3 |
"input": "document",
|
| 4 |
"flag_rule": "flag the document as AI when P(human) < cut",
|
| 5 |
"calibration": {
|
| 6 |
+
"data": "WildOutlines, calibration split (human documents only)",
|
| 7 |
"scores_from": "the training checkpoint, scored on Tinker",
|
| 8 |
"n_humans": 80000,
|
| 9 |
"n_per_format": {
|