Text Generation
Transformers
Safetensors
English
nemotron_h
ai-text-detection
idea-provenance
conversational
Instructions to use rishanthrajendhran/IdeaLens-NoParaphrase with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rishanthrajendhran/IdeaLens-NoParaphrase with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rishanthrajendhran/IdeaLens-NoParaphrase") 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/IdeaLens-NoParaphrase") model = AutoModelForCausalLM.from_pretrained("rishanthrajendhran/IdeaLens-NoParaphrase", 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/IdeaLens-NoParaphrase with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rishanthrajendhran/IdeaLens-NoParaphrase" # 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/IdeaLens-NoParaphrase", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/rishanthrajendhran/IdeaLens-NoParaphrase
- SGLang
How to use rishanthrajendhran/IdeaLens-NoParaphrase 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/IdeaLens-NoParaphrase" \ --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/IdeaLens-NoParaphrase", "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/IdeaLens-NoParaphrase" \ --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/IdeaLens-NoParaphrase", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use rishanthrajendhran/IdeaLens-NoParaphrase with Docker Model Runner:
docker model run hf.co/rishanthrajendhran/IdeaLens-NoParaphrase
Release: merged weights, adapter/ (Tinker LoRA), load_adapter.py, thresholds, card, LICENSE
Browse files- .gitattributes +1 -0
- LICENSE +51 -0
- README.md +188 -13
- adapter_config.json → adapter/adapter_config.json +0 -0
- adapter_model.safetensors → adapter/adapter_model.safetensors +0 -0
- chat_template.jinja +190 -0
- config.json +121 -0
- load_adapter.py +88 -0
- model-00001-of-00014.safetensors +3 -0
- model-00002-of-00014.safetensors +3 -0
- model-00003-of-00014.safetensors +3 -0
- model-00004-of-00014.safetensors +3 -0
- model-00005-of-00014.safetensors +3 -0
- model-00006-of-00014.safetensors +3 -0
- model-00007-of-00014.safetensors +3 -0
- model-00008-of-00014.safetensors +3 -0
- model-00009-of-00014.safetensors +3 -0
- model-00010-of-00014.safetensors +3 -0
- model-00011-of-00014.safetensors +3 -0
- model-00012-of-00014.safetensors +3 -0
- model-00013-of-00014.safetensors +3 -0
- model-00014-of-00014.safetensors +3 -0
- model.safetensors.index.json +0 -0
- special_tokens_map.json +30 -0
- thresholds.json +184 -0
- tokenizer.json +3 -0
- tokenizer_config.json +0 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
LICENSE
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
| 2 |
+
|
| 3 |
+
OpenMDW License Agreement, version 1.1 (OpenMDW-1.1)
|
| 4 |
+
|
| 5 |
+
By exercising rights granted to you under this agreement, you accept and agree
|
| 6 |
+
to its terms.
|
| 7 |
+
|
| 8 |
+
As used in this agreement, "Model Materials" means the materials provided to
|
| 9 |
+
you under this agreement, consisting of: (1) one or more machine learning
|
| 10 |
+
models (including architecture and parameters); and (2) all related artifacts
|
| 11 |
+
(including associated data, documentation and software) that are provided to
|
| 12 |
+
you hereunder.
|
| 13 |
+
|
| 14 |
+
Subject to your compliance with this agreement, permission is hereby granted,
|
| 15 |
+
free of charge, to deal in the Model Materials without restriction, including
|
| 16 |
+
under all copyright, patent, database, and trade secret rights included or
|
| 17 |
+
embodied therein.
|
| 18 |
+
|
| 19 |
+
If you distribute any portion of the Model Materials, you shall retain in your
|
| 20 |
+
distribution (1) a copy of this agreement, and (2) all copyright notices and
|
| 21 |
+
other notices of origin included in the Model Materials that are applicable to
|
| 22 |
+
your distribution.
|
| 23 |
+
|
| 24 |
+
If you file, maintain, or voluntarily participate in a lawsuit against any
|
| 25 |
+
person or entity asserting that the Model Materials directly or indirectly
|
| 26 |
+
infringe any patent or copyright, then all rights and grants made to you
|
| 27 |
+
hereunder are terminated, unless that lawsuit was in response to a
|
| 28 |
+
corresponding lawsuit first brought against you.
|
| 29 |
+
|
| 30 |
+
This agreement does not impose any restrictions or obligations with respect to
|
| 31 |
+
any use, modification, or sharing of any outputs generated by using the Model
|
| 32 |
+
Materials.
|
| 33 |
+
|
| 34 |
+
THE MODEL MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
| 35 |
+
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
| 36 |
+
FITNESS FOR A PARTICULAR PURPOSE, TITLE, NONINFRINGEMENT, ACCURACY, OR THE
|
| 37 |
+
ABSENCE OF LATENT OR OTHER DEFECTS OR ERRORS, WHETHER OR NOT DISCOVERABLE, ALL
|
| 38 |
+
TO THE GREATEST EXTENT PERMISSIBLE UNDER APPLICABLE LAW.
|
| 39 |
+
|
| 40 |
+
YOU ARE SOLELY RESPONSIBLE FOR (1) CLEARING RIGHTS OF OTHER PERSONS THAT MAY
|
| 41 |
+
APPLY TO THE MODEL MATERIALS OR ANY USE THEREOF, INCLUDING WITHOUT LIMITATION
|
| 42 |
+
ANY PERSON'S COPYRIGHTS OR OTHER RIGHTS INCLUDED OR EMBODIED IN THE MODEL
|
| 43 |
+
MATERIALS; (2) OBTAINING ANY NECESSARY CONSENTS, PERMISSIONS OR OTHER RIGHTS
|
| 44 |
+
REQUIRED FOR ANY USE OF THE MODEL MATERIALS; OR (3) PERFORMING ANY DUE
|
| 45 |
+
DILIGENCE OR UNDERTAKING ANY OTHER INVESTIGATIONS INTO THE MODEL MATERIALS OR
|
| 46 |
+
ANYTHING INCORPORATED OR EMBODIED THEREIN.
|
| 47 |
+
|
| 48 |
+
IN NO EVENT SHALL THE PROVIDERS OF THE MODEL MATERIALS BE LIABLE FOR ANY CLAIM,
|
| 49 |
+
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
| 50 |
+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE MODEL MATERIALS, THE
|
| 51 |
+
USE THEREOF OR OTHER DEALINGS THEREIN.
|
README.md
CHANGED
|
@@ -1,24 +1,199 @@
|
|
| 1 |
---
|
| 2 |
license: other
|
| 3 |
license_name: openmdw-1.1
|
|
|
|
| 4 |
base_model: nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16
|
| 5 |
-
library_name:
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
extra_gated_prompt: "Access is granted individually. Please say who you are and what you intend to use the weights for."
|
| 8 |
---
|
| 9 |
|
| 10 |
-
#
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
|
| 16 |
-
-
|
| 17 |
-
|
| 18 |
|
| 19 |
-
|
| 20 |
-
normalised, giving P(human). The detector fires when that falls below a calibrated threshold.
|
| 21 |
-
Thresholds are quantiles over held-out human documents and are **not** included here: a cut
|
| 22 |
-
from one model or input form is meaningless against another's scores.
|
| 23 |
|
| 24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: other
|
| 3 |
license_name: openmdw-1.1
|
| 4 |
+
license_link: LICENSE
|
| 5 |
base_model: nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16
|
| 6 |
+
library_name: transformers
|
| 7 |
+
language:
|
| 8 |
+
- en
|
| 9 |
+
tags:
|
| 10 |
+
- ai-text-detection
|
| 11 |
+
- idea-provenance
|
| 12 |
+
datasets:
|
| 13 |
+
- rishanthrajendhran/IdeaLens-1M
|
| 14 |
extra_gated_prompt: "Access is granted individually. Please say who you are and what you intend to use the weights for."
|
| 15 |
---
|
| 16 |
|
| 17 |
+
# IdeaLens-NoParaphrase
|
| 18 |
|
| 19 |
+
IdeaLens-NoParaphrase is an ablation of IdeaLens: the same backbone, documents and labels, trained on the outlines
|
| 20 |
+
as extracted, without the paraphrasing step that removes the documents' wording. It reads a role-labelled outline and
|
| 21 |
+
returns P(human), the probability that the document's ideas are human.
|
| 22 |
|
| 23 |
+
It is `nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16` fine-tuned with LoRA (rank 64) on the outlines of 1M English
|
| 24 |
+
web documents ([IdeaLens-1M](https://huggingface.co/datasets/rishanthrajendhran/IdeaLens-1M), `outline` field).
|
| 25 |
|
| 26 |
+
## Results
|
|
|
|
|
|
|
|
|
|
| 27 |
|
| 28 |
+
This model is not reported in the paper. It is released for comparison with IdeaLens.
|
| 29 |
+
|
| 30 |
+
## Usage
|
| 31 |
+
|
| 32 |
+
Scoring a document takes two steps:
|
| 33 |
+
|
| 34 |
+
1. **Extract an outline.** An LLM writes the outline from the document, its format's role vocabulary and six worked
|
| 35 |
+
examples (the paper uses Gemini 3.7 Flash). The prompts and role vocabularies are in the code repository: *link
|
| 36 |
+
added on publication*. Score the outline as extracted; the paraphrasing step is only for training data.
|
| 37 |
+
2. **Score the outline** with this model, as below.
|
| 38 |
+
|
| 39 |
+
### Load the merged model (66 GB download)
|
| 40 |
+
|
| 41 |
+
```python
|
| 42 |
+
import torch
|
| 43 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 44 |
+
|
| 45 |
+
tok = AutoTokenizer.from_pretrained("rishanthrajendhran/IdeaLens-NoParaphrase")
|
| 46 |
+
model = AutoModelForCausalLM.from_pretrained("rishanthrajendhran/IdeaLens-NoParaphrase", dtype=torch.bfloat16, device_map="auto").eval()
|
| 47 |
+
```
|
| 48 |
+
|
| 49 |
+
The weights take 59 GiB of GPU memory, and each input adds more; see *Hardware requirements*.
|
| 50 |
+
|
| 51 |
+
### Or apply the adapter to the base model (3 GB download)
|
| 52 |
+
|
| 53 |
+
`adapter/` holds the LoRA adapter as trained, in the layout of the Tinker training service. If you already have the
|
| 54 |
+
base model, `load_adapter.py` merges the adapter into it in memory. The resulting weights are bit-identical to the
|
| 55 |
+
merged model's:
|
| 56 |
+
|
| 57 |
+
```python
|
| 58 |
+
import importlib.util
|
| 59 |
+
from huggingface_hub import hf_hub_download
|
| 60 |
+
|
| 61 |
+
path = hf_hub_download("rishanthrajendhran/IdeaLens-NoParaphrase", "load_adapter.py")
|
| 62 |
+
spec = importlib.util.spec_from_file_location("load_adapter", path)
|
| 63 |
+
la = importlib.util.module_from_spec(spec); spec.loader.exec_module(la)
|
| 64 |
+
model, tok = la.load_model() # base model + adapter/, then la.p_human(model, tok, outline)
|
| 65 |
+
```
|
| 66 |
+
|
| 67 |
+
Do not load `adapter/` with `peft.PeftModel`. In transformers, Nemotron fuses the Mamba gate and x projections into
|
| 68 |
+
one `in_proj` and stores each layer's 128 routed experts as a single 3D tensor, so PEFT has nowhere to attach most of
|
| 69 |
+
the adapter and skips it without a warning; the model then scores close to the base model. `tinker-cookbook`'s
|
| 70 |
+
`weights.build_hf_model` can also merge the adapter into full weights.
|
| 71 |
+
|
| 72 |
+
### Score an outline
|
| 73 |
+
|
| 74 |
+
Write the outline one item per line, as `[Role] content`. IdeaLens-NoParaphrase compares the next-token probabilities of `human` and `ai`:
|
| 75 |
+
|
| 76 |
+
```python
|
| 77 |
+
SYSTEM = "Given a role-labelled outline of a document, answer with one word: human if the source document was human-written, ai if it was AI-generated."
|
| 78 |
+
SUFFIX = "<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n"
|
| 79 |
+
HUMAN, AI = 50755, 2464 # token ids of "human" and "ai"
|
| 80 |
+
|
| 81 |
+
@torch.no_grad()
|
| 82 |
+
def p_human(outline):
|
| 83 |
+
ids = tok.encode(f"<|im_start|>system\n{SYSTEM}<|im_end|>\n<|im_start|>user\n{outline}{SUFFIX}",
|
| 84 |
+
add_special_tokens=False)
|
| 85 |
+
logits = model(torch.tensor([ids], device=model.device)).logits[0, -1].float()
|
| 86 |
+
return torch.softmax(logits[[HUMAN, AI]], -1)[0].item()
|
| 87 |
+
|
| 88 |
+
outline = ("[Central Development] A town's water supply fails after a drought, and residents organise to share wells.\n"
|
| 89 |
+
"[Background Context] The reservoir has been shrinking for three summers.\n"
|
| 90 |
+
"[Open Question] Whether the council will fund a new pipeline remains undecided.")
|
| 91 |
+
print(p_human(outline))
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
Build the prompt string exactly as above rather than through the chat template.
|
| 95 |
+
|
| 96 |
+
### Thresholds
|
| 97 |
+
|
| 98 |
+
IdeaLens-NoParaphrase flags a document as having AI ideas when P(human) is at or below a cut. Each cut is set so
|
| 99 |
+
that a given share of human documents is flagged (the false-positive rate, FPR), measured on the 80,000 human
|
| 100 |
+
documents in IdeaLens-1M's `calibration` split (10,000 per format). The paper's operating point is the global
|
| 101 |
+
cut at 1% FPR. These cuts were fitted on scores from the merged weights in this repo, computed locally in bf16.
|
| 102 |
+
|
| 103 |
+
| FPR | 0.1% | 0.5% | 1% | 2% | 5% |
|
| 104 |
+
|---|---:|---:|---:|---:|---:|
|
| 105 |
+
| Global cut | 0.00538 | 0.03359 | 0.09947 | 0.50391 | 0.94738 |
|
| 106 |
+
|
| 107 |
+
Per-format cuts give each format its own operating point. They need the document's format, which the paper
|
| 108 |
+
assigns with WebOrganizer's FormatClassifier (FormatClassifier-NoURL when there is no URL). Each is the
|
| 109 |
+
format's own quantile, shrunk toward the global cut with weight n / (n + 2500); at 0.1% FPR 10,000 documents
|
| 110 |
+
per format are too few, so there is no per-format cut. A document outside these eight formats has no
|
| 111 |
+
per-format cut; do not fall back to the global cut for it.
|
| 112 |
+
|
| 113 |
+
| Format | 0.5% | 1% | 2% | 5% |
|
| 114 |
+
|---|---:|---:|---:|---:|
|
| 115 |
+
| Nonfiction Writing | 0.01682 | 0.04034 | 0.14608 | 0.74359 |
|
| 116 |
+
| Knowledge Article | 0.02455 | 0.05113 | 0.16982 | 0.79109 |
|
| 117 |
+
| Personal Blog | 0.10743 | 0.47575 | 0.79001 | 0.97165 |
|
| 118 |
+
| News Article | 0.02812 | 0.07552 | 0.33610 | 0.86126 |
|
| 119 |
+
| Academic Writing | 0.17216 | 0.61199 | 0.85898 | 0.98434 |
|
| 120 |
+
| User Reviews | 0.15260 | 0.35787 | 0.76215 | 0.97357 |
|
| 121 |
+
| Personal About Page | 0.05767 | 0.23257 | 0.65484 | 0.94379 |
|
| 122 |
+
| Creative Writing | 0.36622 | 0.60222 | 0.80796 | 0.96994 |
|
| 123 |
+
|
| 124 |
+
`thresholds.json` holds every cut at full precision, plus per-topic cuts for the WebOrganizer topics with enough calibration documents.
|
| 125 |
+
|
| 126 |
+
These rates hold for English web documents like the training data. For another domain, fit the cut on
|
| 127 |
+
human documents from that domain.
|
| 128 |
+
|
| 129 |
+
IdeaLens-NoParaphrase scores 91% of human calibration documents above 0.99, so its cuts at higher FPRs sit close
|
| 130 |
+
to 1 and small shifts in score move the realised FPR a long way.
|
| 131 |
+
|
| 132 |
+
## Hardware requirements
|
| 133 |
+
|
| 134 |
+
Measured with transformers 5.15 in bf16 on NVIDIA H100 80GB GPUs (our other runs used A100 80GB), with transformers'
|
| 135 |
+
PyTorch implementation of the Mamba layers (no fused Mamba kernels installed). We have not tried CPU-only inference.
|
| 136 |
+
|
| 137 |
+
| | Merged model | Adapter route (`load_adapter.py`) |
|
| 138 |
+
|---|---|---|
|
| 139 |
+
| Download | 65.8 GB | 65.8 GB base model + 3.1 GB adapter |
|
| 140 |
+
| Peak CPU RAM while loading | 60 GiB | 60 GiB |
|
| 141 |
+
| GPU memory once loaded | 58.8 GiB | 58.8 GiB (66 GiB during the ~10 s it takes to apply the adapter) |
|
| 142 |
+
|
| 143 |
+
GPU memory then grows with the length of the input, by about 4.2 MiB per token at typical lengths, scoring one
|
| 144 |
+
input at a time:
|
| 145 |
+
|
| 146 |
+
| Input tokens | 500 | 1,000 | 2,000 | 4,000 | 8,000 |
|
| 147 |
+
|---|---:|---:|---:|---:|---:|
|
| 148 |
+
| Peak GPU memory, one 80 GB GPU | 61.0 GiB | 63.1 GiB | 67.3 GiB | 75.7 GiB | does not fit |
|
| 149 |
+
| Peak memory per GPU, two 80 GB GPUs (`device_map="auto"`) | | | | 47.4 GiB | 63.7 GiB |
|
| 150 |
+
| Seconds per input, H100 | 0.18 | 0.34 | 0.66 | 1.32 | 2.70 |
|
| 151 |
+
|
| 152 |
+
Inputs of 6,000 tokens do not fit on one 80 GB GPU and 12,000 do not fit on two; lowering the Mamba chunk size from
|
| 153 |
+
128 to 64 did not change either limit.
|
| 154 |
+
|
| 155 |
+
IdeaLens-NoParaphrase reads outlines, which are short. The outlines in IdeaLens-1M's calibration split average about 640
|
| 156 |
+
tokens with the prompt, and the longest is under 3,800, so one 80 GB GPU (A100 80GB or H100 80GB) is enough. Outline
|
| 157 |
+
extraction runs through an LLM API and needs no local GPU.
|
| 158 |
+
|
| 159 |
+
## Intended use and limitations
|
| 160 |
+
|
| 161 |
+
- IdeaLens-NoParaphrase estimates the provenance of a document's ideas. It should not be the sole basis for decisions about a person's work.
|
| 162 |
+
- It was trained on English web documents of at least 500 words in eight long-form formats (Nonfiction Writing, Knowledge Article, Personal Blog, News Article, Academic Writing, User Reviews, Personal About Page, Creative Writing).
|
| 163 |
+
- Its training labels come from the Pangram prose detector, applied to whole documents. They record who wrote the prose, and because these outlines keep some of the documents' wording, the model can learn from that wording as well as from the ideas.
|
| 164 |
+
- Errors in outline extraction carry into the score.
|
| 165 |
+
|
| 166 |
+
## Related models
|
| 167 |
+
|
| 168 |
+
| Model | Backbone | Reads |
|
| 169 |
+
|---|---|---|
|
| 170 |
+
| [IdeaLens](https://huggingface.co/rishanthrajendhran/IdeaLens) | Nemotron-3.5-Lightning-30B-A3B, LoRA | outline |
|
| 171 |
+
| [ProseLens](https://huggingface.co/rishanthrajendhran/ProseLens) | Nemotron-3.5-Lightning-30B-A3B, LoRA | document text |
|
| 172 |
+
| [IdeaLens-NoParaphrase](https://huggingface.co/rishanthrajendhran/IdeaLens-NoParaphrase) (this model) | Nemotron-3.5-Lightning-30B-A3B, LoRA | outline, trained without paraphrasing |
|
| 173 |
+
| [IdeaLens-Qwen3.5-9B](https://huggingface.co/rishanthrajendhran/IdeaLens-Qwen3.5-9B) | Qwen3.5-9B, classification head | outline |
|
| 174 |
+
| [IdeaLens-ModernBERT-L](https://huggingface.co/rishanthrajendhran/IdeaLens-ModernBERT-L) | ModernBERT-large | outline |
|
| 175 |
+
| [ProseLens-ModernBERT-L](https://huggingface.co/rishanthrajendhran/ProseLens-ModernBERT-L) | ModernBERT-large | document text |
|
| 176 |
+
| [IdeaLens-LogisticClassifier](https://huggingface.co/rishanthrajendhran/IdeaLens-LogisticClassifier) | logistic regression over text-embedding-3-large | outline |
|
| 177 |
+
| [IdeaLens-ModernBERT-L-NoParaphrase](https://huggingface.co/rishanthrajendhran/IdeaLens-ModernBERT-L-NoParaphrase) | ModernBERT-large | outline, trained without paraphrasing |
|
| 178 |
+
| [IdeaLens-ModernBERT-L-RolesOnly](https://huggingface.co/rishanthrajendhran/IdeaLens-ModernBERT-L-RolesOnly) | ModernBERT-large | role labels only |
|
| 179 |
+
| [IdeaLens-Qwen3.5-9B-PerItem](https://huggingface.co/rishanthrajendhran/IdeaLens-Qwen3.5-9B-PerItem) | Qwen3.5-9B, classification head | single outline items, pooled |
|
| 180 |
+
| [IdeaLens-ModernBERT-L-PerItem](https://huggingface.co/rishanthrajendhran/IdeaLens-ModernBERT-L-PerItem) | ModernBERT-large | single outline items, pooled |
|
| 181 |
+
| [IdeaLens-LogisticClassifier-PerItem](https://huggingface.co/rishanthrajendhran/IdeaLens-LogisticClassifier-PerItem) | logistic regression over text-embedding-3-large | single outline items, pooled |
|
| 182 |
+
|
| 183 |
+
Training data: [IdeaLens-1M](https://huggingface.co/datasets/rishanthrajendhran/IdeaLens-1M).
|
| 184 |
+
|
| 185 |
+
## License
|
| 186 |
+
|
| 187 |
+
OpenMDW-1.1, the license of the base model (see `LICENSE`).
|
| 188 |
+
|
| 189 |
+
## Citation
|
| 190 |
+
|
| 191 |
+
```bibtex
|
| 192 |
+
@article{idealens2026,
|
| 193 |
+
title = {IdeaLens: Detecting AI Ideas in Long-form Writing},
|
| 194 |
+
author = {Anonymous},
|
| 195 |
+
journal = {arXiv preprint arXiv:TBD},
|
| 196 |
+
year = {2026},
|
| 197 |
+
url = {https://arxiv.org/abs/TBD}
|
| 198 |
+
}
|
| 199 |
+
```
|
adapter_config.json → adapter/adapter_config.json
RENAMED
|
File without changes
|
adapter_model.safetensors → adapter/adapter_model.safetensors
RENAMED
|
File without changes
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,190 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% macro render_extra_keys(json_dict, handled_keys) %}
|
| 2 |
+
{%- if json_dict is mapping %}
|
| 3 |
+
{%- for json_key in json_dict if json_key not in handled_keys %}
|
| 4 |
+
{%- if json_dict[json_key] is mapping or (json_dict[json_key] is sequence and json_dict[json_key] is not string) %}
|
| 5 |
+
{{- '\n<' ~ json_key ~ '>' ~ (json_dict[json_key] | tojson | safe) ~ '</' ~ json_key ~ '>' }}
|
| 6 |
+
{%- else %}
|
| 7 |
+
{{-'\n<' ~ json_key ~ '>' ~ (json_dict[json_key] | string) ~ '</' ~ json_key ~ '>' }}
|
| 8 |
+
{%- endif %}
|
| 9 |
+
{%- endfor %}
|
| 10 |
+
{%- endif %}
|
| 11 |
+
{% endmacro %}
|
| 12 |
+
{%- set enable_thinking = enable_thinking if enable_thinking is defined else True %}
|
| 13 |
+
{%- set truncate_history_thinking = truncate_history_thinking if truncate_history_thinking is defined else True %}
|
| 14 |
+
{%- set ns = namespace(last_user_idx = -1) %}
|
| 15 |
+
{%- set loop_messages = messages %}
|
| 16 |
+
{%- for m in loop_messages %}
|
| 17 |
+
{%- if m["role"] == "user" %}
|
| 18 |
+
{%- set ns.last_user_idx = loop.index0 %}
|
| 19 |
+
{%- endif %}
|
| 20 |
+
{%- endfor %}
|
| 21 |
+
{%- if messages[0]["role"] == "system" %}
|
| 22 |
+
{%- set system_message = messages[0]["content"] %}
|
| 23 |
+
{%- set loop_messages = messages[1:] %}
|
| 24 |
+
{%- else %}
|
| 25 |
+
{%- set system_message = "" %}
|
| 26 |
+
{%- set loop_messages = messages %}
|
| 27 |
+
{%- endif %}
|
| 28 |
+
{%- if not tools is defined %}
|
| 29 |
+
{%- set tools = [] %}
|
| 30 |
+
{%- endif %}
|
| 31 |
+
{%- set ns = namespace(last_user_idx = -1) %}
|
| 32 |
+
{%- for m in loop_messages %}
|
| 33 |
+
{%- if m["role"] == "user" %}
|
| 34 |
+
{%- set ns.last_user_idx = loop.index0 %}
|
| 35 |
+
{%- endif %}
|
| 36 |
+
{%- endfor %}
|
| 37 |
+
{%- if system_message is defined %}
|
| 38 |
+
{{- "<|im_start|>system\n" + system_message }}
|
| 39 |
+
{%- else %}
|
| 40 |
+
{%- if tools is iterable and tools | length > 0 %}
|
| 41 |
+
{{- "<|im_start|>system\n" }}
|
| 42 |
+
{%- endif %}
|
| 43 |
+
{%- endif %}
|
| 44 |
+
{%- if tools is iterable and tools | length > 0 %}
|
| 45 |
+
{%- if system_message is defined and system_message | length > 0 %}
|
| 46 |
+
{{- "\n\n" }}
|
| 47 |
+
{%- endif %}
|
| 48 |
+
{{- "# Tools\n\nYou have access to the following functions:\n\n" }}
|
| 49 |
+
{{- "<tools>" }}
|
| 50 |
+
{%- for tool in tools %}
|
| 51 |
+
{%- if tool.function is defined %}
|
| 52 |
+
{%- set tool = tool.function %}
|
| 53 |
+
{%- endif %}
|
| 54 |
+
{{- "\n<function>\n<name>" ~ tool.name ~ "</name>" }}
|
| 55 |
+
{%- if tool.description is defined %}
|
| 56 |
+
{{- '\n<description>' ~ (tool.description | trim) ~ '</description>' }}
|
| 57 |
+
{%- endif %}
|
| 58 |
+
{{- '\n<parameters>' }}
|
| 59 |
+
{%- if tool.parameters is defined and tool.parameters is mapping and tool.parameters.properties is defined and tool.parameters.properties is mapping %}
|
| 60 |
+
{%- for param_name, param_fields in tool.parameters.properties|items %}
|
| 61 |
+
{{- '\n<parameter>' }}
|
| 62 |
+
{{- '\n<name>' ~ param_name ~ '</name>' }}
|
| 63 |
+
{%- if param_fields.type is defined %}
|
| 64 |
+
{{- '\n<type>' ~ (param_fields.type | string) ~ '</type>' }}
|
| 65 |
+
{%- endif %}
|
| 66 |
+
{%- if param_fields.description is defined %}
|
| 67 |
+
{{- '\n<description>' ~ (param_fields.description | trim) ~ '</description>' }}
|
| 68 |
+
{%- endif %}
|
| 69 |
+
{%- if param_fields.enum is defined %}
|
| 70 |
+
{{- '\n<enum>' ~ (param_fields.enum | tojson | safe) ~ '</enum>' }}
|
| 71 |
+
{%- endif %}
|
| 72 |
+
{%- set handled_keys = ['name', 'type', 'description', 'enum'] %}
|
| 73 |
+
{{- render_extra_keys(param_fields, handled_keys) }}
|
| 74 |
+
{{- '\n</parameter>' }}
|
| 75 |
+
{%- endfor %}
|
| 76 |
+
{%- endif %}
|
| 77 |
+
{% set handled_keys = ['type', 'properties', 'required'] %}
|
| 78 |
+
{{- render_extra_keys(tool.parameters, handled_keys) }}
|
| 79 |
+
{%- if tool.parameters is defined and tool.parameters.required is defined %}
|
| 80 |
+
{{- '\n<required>' ~ (tool.parameters.required | tojson | safe) ~ '</required>' }}
|
| 81 |
+
{%- endif %}
|
| 82 |
+
{{- '\n</parameters>' }}
|
| 83 |
+
{%- set handled_keys = ['type', 'name', 'description', 'parameters'] %}
|
| 84 |
+
{{- render_extra_keys(tool, handled_keys) }}
|
| 85 |
+
{{- '\n</function>' }}
|
| 86 |
+
{%- endfor %}
|
| 87 |
+
{{- "\n</tools>" }}
|
| 88 |
+
{{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n<tool_call>\n<function=example_function_name>\n<parameter=example_parameter_1>\nvalue_1\n</parameter>\n<parameter=example_parameter_2>\nThis is the value for the second parameter\nthat can span\nmultiple lines\n</parameter>\n</function>\n</tool_call>\n\n<IMPORTANT>\nReminder:\n- Function calls MUST follow the specified format: an inner <function=...></function> block must be nested within <tool_call></tool_call> XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n</IMPORTANT>' }}
|
| 89 |
+
{%- endif %}
|
| 90 |
+
{%- if system_message is defined %}
|
| 91 |
+
{{- '<|im_end|>\n' }}
|
| 92 |
+
{%- else %}
|
| 93 |
+
{%- if tools is iterable and tools | length > 0 %}
|
| 94 |
+
{{- '<|im_end|>\n' }}
|
| 95 |
+
{%- endif %}
|
| 96 |
+
{%- endif %}
|
| 97 |
+
{%- for message in loop_messages %}
|
| 98 |
+
{%- if message.role == "assistant" %}
|
| 99 |
+
{%- if message.reasoning_content is defined and message.reasoning_content is string and message.reasoning_content | trim | length > 0 %}
|
| 100 |
+
{%- set content = "<think>\n" ~ message.reasoning_content ~ "</think>" ~ (message.content | default('', true)) %}
|
| 101 |
+
{%- else %}
|
| 102 |
+
{%- set content = message.content | default('', true) %}
|
| 103 |
+
{%- if content is string -%}
|
| 104 |
+
{%- if '<think>' not in content and '</think>' not in content -%}
|
| 105 |
+
{%- set content = "<think></think>" ~ content -%}
|
| 106 |
+
{%- endif -%}
|
| 107 |
+
{%- else -%}
|
| 108 |
+
{%- set content = content -%}
|
| 109 |
+
{%- endif -%}
|
| 110 |
+
{%- endif %}
|
| 111 |
+
{%- if message.tool_calls is defined and message.tool_calls is iterable and message.tool_calls | length > 0 %}
|
| 112 |
+
{{- '<|im_start|>assistant\n' }}
|
| 113 |
+
{%- set include_content = not (truncate_history_thinking and loop.index0 < ns.last_user_idx) %}
|
| 114 |
+
{%- if content is string and content | trim | length > 0 %}
|
| 115 |
+
{%- if include_content %}
|
| 116 |
+
{{- (content | trim) ~ '\n' -}}
|
| 117 |
+
{%- else %}
|
| 118 |
+
{%- set c = (content | string) %}
|
| 119 |
+
{%- if '</think>' in c %}
|
| 120 |
+
{%- set c = c.split('</think>')[-1] %}
|
| 121 |
+
{%- elif '<think>' in c %}
|
| 122 |
+
{%- set c = c.split('<think>')[0] %}
|
| 123 |
+
{%- endif %}
|
| 124 |
+
{%- set c = "<think></think>" ~ c %}
|
| 125 |
+
{%- if c | length > 0 %}
|
| 126 |
+
{{- c ~ '\n' -}}
|
| 127 |
+
{%- endif %}
|
| 128 |
+
{%- endif %}
|
| 129 |
+
{%- else %}
|
| 130 |
+
{{- "<think></think>" -}}
|
| 131 |
+
{%- endif %}
|
| 132 |
+
{%- for tool_call in message.tool_calls %}
|
| 133 |
+
{%- if tool_call.function is defined %}
|
| 134 |
+
{%- set tool_call = tool_call.function %}
|
| 135 |
+
{%- endif %}
|
| 136 |
+
{{- '<tool_call>\n<function=' ~ tool_call.name ~ '>\n' -}}
|
| 137 |
+
{%- if tool_call.arguments is defined %}
|
| 138 |
+
{%- for args_name, args_value in tool_call.arguments|items %}
|
| 139 |
+
{{- '<parameter=' ~ args_name ~ '>\n' -}}
|
| 140 |
+
{%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %}
|
| 141 |
+
{{- args_value ~ '\n</parameter>\n' -}}
|
| 142 |
+
{%- endfor %}
|
| 143 |
+
{%- endif %}
|
| 144 |
+
{{- '</function>\n</tool_call>\n' -}}
|
| 145 |
+
{%- endfor %}
|
| 146 |
+
{{- '<|im_end|>\n' }}
|
| 147 |
+
{%- else %}
|
| 148 |
+
{%- if not (truncate_history_thinking and loop.index0 < ns.last_user_idx) %}
|
| 149 |
+
{{- '<|im_start|>assistant\n' ~ (content | default('', true) | string | trim) ~ '<|im_end|>\n' }}
|
| 150 |
+
{%- else %}
|
| 151 |
+
{%- set c = (content | default('', true) | string) %}
|
| 152 |
+
{%- if '<think>' in c and '</think>' in c %}
|
| 153 |
+
{%- set c = "<think></think>" ~ c.split('</think>')[-1] %}
|
| 154 |
+
{%- endif %}
|
| 155 |
+
{%- set c = c | trim %}
|
| 156 |
+
{%- if c | length > 0 %}
|
| 157 |
+
{{- '<|im_start|>assistant\n' ~ c ~ '<|im_end|>\n' }}
|
| 158 |
+
{%- else %}
|
| 159 |
+
{{- '<|im_start|>assistant\n<|im_end|>\n' }}
|
| 160 |
+
{%- endif %}
|
| 161 |
+
{%- endif %}
|
| 162 |
+
{%- endif %}
|
| 163 |
+
{%- elif message.role == "user" or message.role == "system" %}
|
| 164 |
+
{{- '<|im_start|>' + message.role + '\n' }}
|
| 165 |
+
{%- set content = message.content | string %}
|
| 166 |
+
{{- content }}
|
| 167 |
+
{{- '<|im_end|>\n' }}
|
| 168 |
+
{%- elif message.role == "tool" %}
|
| 169 |
+
{%- if loop.previtem and loop.previtem.role != "tool" %}
|
| 170 |
+
{{- '<|im_start|>user\n' }}
|
| 171 |
+
{%- endif %}
|
| 172 |
+
{{- '<tool_response>\n' }}
|
| 173 |
+
{{- message.content }}
|
| 174 |
+
{{- '\n</tool_response>\n' }}
|
| 175 |
+
{%- if not loop.last and loop.nextitem.role != "tool" %}
|
| 176 |
+
{{- '<|im_end|>\n' }}
|
| 177 |
+
{%- elif loop.last %}
|
| 178 |
+
{{- '<|im_end|>\n' }}
|
| 179 |
+
{%- endif %}
|
| 180 |
+
{%- else %}
|
| 181 |
+
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>\n' }}
|
| 182 |
+
{%- endif %}
|
| 183 |
+
{%- endfor %}
|
| 184 |
+
{%- if add_generation_prompt %}
|
| 185 |
+
{%- if enable_thinking %}
|
| 186 |
+
{{- '<|im_start|>assistant\n<think>\n' }}
|
| 187 |
+
{%- else %}
|
| 188 |
+
{{- '<|im_start|>assistant\n<think></think>' }}
|
| 189 |
+
{%- endif %}
|
| 190 |
+
{%- endif %}
|
config.json
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"NemotronHForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 1,
|
| 8 |
+
"chunk_size": 128,
|
| 9 |
+
"conv_kernel": 4,
|
| 10 |
+
"dtype": "bfloat16",
|
| 11 |
+
"eos_token_id": 2,
|
| 12 |
+
"expand": 2,
|
| 13 |
+
"head_dim": 128,
|
| 14 |
+
"hidden_dropout": 0.0,
|
| 15 |
+
"hidden_size": 2688,
|
| 16 |
+
"initializer_range": 0.02,
|
| 17 |
+
"intermediate_size": 1856,
|
| 18 |
+
"layer_norm_epsilon": 1e-05,
|
| 19 |
+
"mamba_head_dim": 64,
|
| 20 |
+
"mamba_hidden_act": "silu",
|
| 21 |
+
"mamba_num_heads": 64,
|
| 22 |
+
"mamba_proj_bias": false,
|
| 23 |
+
"mamba_ssm_cache_dtype": "float32",
|
| 24 |
+
"max_position_embeddings": 262144,
|
| 25 |
+
"mlp_bias": false,
|
| 26 |
+
"mlp_hidden_act": "relu2",
|
| 27 |
+
"model_type": "nemotron_h",
|
| 28 |
+
"moe_intermediate_size": 1856,
|
| 29 |
+
"moe_latent_size": null,
|
| 30 |
+
"moe_shared_expert_intermediate_size": 3712,
|
| 31 |
+
"moe_shared_expert_overlap": true,
|
| 32 |
+
"n_group": 1,
|
| 33 |
+
"n_groups": 8,
|
| 34 |
+
"n_routed_experts": 128,
|
| 35 |
+
"n_shared_experts": 1,
|
| 36 |
+
"norm_eps": 1e-05,
|
| 37 |
+
"norm_topk_prob": true,
|
| 38 |
+
"num_attention_heads": 32,
|
| 39 |
+
"num_experts_per_tok": 6,
|
| 40 |
+
"num_hidden_layers": 52,
|
| 41 |
+
"num_key_value_heads": 2,
|
| 42 |
+
"num_logits_to_keep": 1,
|
| 43 |
+
"num_nextn_predict_layers": 1,
|
| 44 |
+
"pad_token_id": 0,
|
| 45 |
+
"partial_rotary_factor": 1.0,
|
| 46 |
+
"rescale_prenorm_residual": true,
|
| 47 |
+
"residual_in_fp32": false,
|
| 48 |
+
"rope_theta": 10000,
|
| 49 |
+
"routed_scaling_factor": 2.5,
|
| 50 |
+
"sliding_window": null,
|
| 51 |
+
"ssm_state_size": 128,
|
| 52 |
+
"tie_word_embeddings": false,
|
| 53 |
+
"time_step_floor": 0.0001,
|
| 54 |
+
"time_step_max": 0.1,
|
| 55 |
+
"time_step_min": 0.001,
|
| 56 |
+
"topk_group": 1,
|
| 57 |
+
"transformers_version": "4.57.6",
|
| 58 |
+
"use_bias": false,
|
| 59 |
+
"use_cache": true,
|
| 60 |
+
"use_conv_bias": true,
|
| 61 |
+
"use_mamba_kernels": true,
|
| 62 |
+
"vocab_size": 131072,
|
| 63 |
+
"layers_block_type": [
|
| 64 |
+
"mamba",
|
| 65 |
+
"moe",
|
| 66 |
+
"mamba",
|
| 67 |
+
"moe",
|
| 68 |
+
"mamba",
|
| 69 |
+
"attention",
|
| 70 |
+
"moe",
|
| 71 |
+
"mamba",
|
| 72 |
+
"moe",
|
| 73 |
+
"mamba",
|
| 74 |
+
"moe",
|
| 75 |
+
"mamba",
|
| 76 |
+
"attention",
|
| 77 |
+
"moe",
|
| 78 |
+
"mamba",
|
| 79 |
+
"moe",
|
| 80 |
+
"mamba",
|
| 81 |
+
"moe",
|
| 82 |
+
"mamba",
|
| 83 |
+
"attention",
|
| 84 |
+
"moe",
|
| 85 |
+
"mamba",
|
| 86 |
+
"moe",
|
| 87 |
+
"mamba",
|
| 88 |
+
"moe",
|
| 89 |
+
"mamba",
|
| 90 |
+
"attention",
|
| 91 |
+
"moe",
|
| 92 |
+
"mamba",
|
| 93 |
+
"moe",
|
| 94 |
+
"mamba",
|
| 95 |
+
"moe",
|
| 96 |
+
"mamba",
|
| 97 |
+
"attention",
|
| 98 |
+
"moe",
|
| 99 |
+
"mamba",
|
| 100 |
+
"moe",
|
| 101 |
+
"mamba",
|
| 102 |
+
"moe",
|
| 103 |
+
"mamba",
|
| 104 |
+
"moe",
|
| 105 |
+
"mamba",
|
| 106 |
+
"attention",
|
| 107 |
+
"moe",
|
| 108 |
+
"mamba",
|
| 109 |
+
"moe",
|
| 110 |
+
"mamba",
|
| 111 |
+
"moe",
|
| 112 |
+
"mamba",
|
| 113 |
+
"moe",
|
| 114 |
+
"mamba",
|
| 115 |
+
"moe"
|
| 116 |
+
],
|
| 117 |
+
"mtp_layers_block_type": [
|
| 118 |
+
"attention",
|
| 119 |
+
"moe"
|
| 120 |
+
]
|
| 121 |
+
}
|
load_adapter.py
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""Apply the LoRA adapter in this repo's adapter/ folder to the base model, then score role-labelled outlines.
|
| 2 |
+
|
| 3 |
+
adapter/ holds the adapter as trained, in the layout of the Tinker training service. Do not load it with
|
| 4 |
+
peft.PeftModel. In transformers, Nemotron fuses the Mamba gate and x projections into one `in_proj`, and stores each
|
| 5 |
+
MoE layer's 128 routed experts as a single 3D tensor. PEFT has no module to attach those LoRA weights to and skips them
|
| 6 |
+
without a warning. This script instead merges every LoRA delta, W += (alpha / r) * B @ A, into the base weights in
|
| 7 |
+
place, following the same rules as the tinker-cookbook merge (tinker_cookbook.weights.build_hf_model). The resulting
|
| 8 |
+
weights are bit-identical to the merged model in this repo.
|
| 9 |
+
|
| 10 |
+
Needs transformers >= 5.15, torch, safetensors and huggingface_hub. The weights take 59 GiB of GPU memory and each
|
| 11 |
+
input adds about 4.2 MiB per token, so one 80 GB GPU handles inputs up to about 4,000 tokens; see the model card.
|
| 12 |
+
"""
|
| 13 |
+
import json
|
| 14 |
+
|
| 15 |
+
import torch
|
| 16 |
+
from huggingface_hub import snapshot_download
|
| 17 |
+
from safetensors.torch import load_file
|
| 18 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 19 |
+
|
| 20 |
+
REPO = "rishanthrajendhran/IdeaLens-NoParaphrase"
|
| 21 |
+
BASE = "nvidia/NVIDIA-Nemotron-3.5-Lightning-30B-A3B-BF16"
|
| 22 |
+
SYSTEM = 'Given a role-labelled outline of a document, answer with one word: human if the source document was human-written, ai if it was AI-generated.'
|
| 23 |
+
SUFFIX = "<|im_end|>\n<|im_start|>assistant\n<think>\n\n</think>\n\n"
|
| 24 |
+
HUMAN, AI = 50755, 2464
|
| 25 |
+
CUT = 0.09947 # P(human) at or below this is flagged: the global cut at 1% FPR (thresholds.json)
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
def apply_tinker_lora(model, adapter_dir):
|
| 29 |
+
"""Merge a Tinker LoRA archive for Nemotron-3.5 into `model` in place. Returns the parameter names changed."""
|
| 30 |
+
cfg = json.load(open(f"{adapter_dir}/adapter_config.json"))
|
| 31 |
+
scale = cfg["lora_alpha"] / cfg["r"]
|
| 32 |
+
lora = load_file(f"{adapter_dir}/adapter_model.safetensors")
|
| 33 |
+
params = dict(model.named_parameters())
|
| 34 |
+
touched = []
|
| 35 |
+
for key_a in sorted(k for k in lora if k.endswith(".lora_A.weight")):
|
| 36 |
+
A, B = lora[key_a], lora[key_a.replace(".lora_A.", ".lora_B.")]
|
| 37 |
+
if A.numel() == 0: # the experts have no gate projection; Tinker keeps an empty w3 placeholder
|
| 38 |
+
continue
|
| 39 |
+
name = key_a.removeprefix("base_model.model.").removesuffix(".lora_A.weight")
|
| 40 |
+
rows = None
|
| 41 |
+
if name == "model.lm_head": # Tinker nests the LM head under model.
|
| 42 |
+
target = "lm_head.weight"
|
| 43 |
+
elif name.endswith((".gate_proj", ".x_proj")): # Mamba: in_proj rows are [gate | x | B | C | dt]
|
| 44 |
+
layer, proj = name.rsplit(".", 1)
|
| 45 |
+
target = f"{layer}.in_proj.weight"
|
| 46 |
+
start = 0 if proj == "gate_proj" else lora[f"base_model.model.{layer}.gate_proj.lora_B.weight"].shape[0]
|
| 47 |
+
rows = slice(start, start + B.shape[0])
|
| 48 |
+
elif name.endswith(".experts.w1"): # routed experts: w1 = up_proj, one (expert, out, in) tensor per layer
|
| 49 |
+
target = name.removesuffix("w1") + "up_proj"
|
| 50 |
+
elif name.endswith(".experts.w2"): # w2 = down_proj
|
| 51 |
+
target = name.removesuffix("w2") + "down_proj"
|
| 52 |
+
else: # attention, Mamba out_proj, shared experts
|
| 53 |
+
target = name + ".weight"
|
| 54 |
+
W = params[target] # KeyError here means the adapter does not match this model
|
| 55 |
+
# For experts one side is shared (leading dim 1) and broadcasts across the 128 experts.
|
| 56 |
+
delta = scale * torch.matmul(B.to(W.device, torch.float32), A.to(W.device, torch.float32))
|
| 57 |
+
with torch.no_grad():
|
| 58 |
+
view = W.data if rows is None else W.data[rows]
|
| 59 |
+
assert view.shape == delta.shape, (target, tuple(view.shape), tuple(delta.shape))
|
| 60 |
+
view.copy_((view.float() + delta).to(W.dtype))
|
| 61 |
+
touched.append(target)
|
| 62 |
+
return touched
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
def load_model(repo=REPO, device_map="auto"):
|
| 66 |
+
tok = AutoTokenizer.from_pretrained(BASE)
|
| 67 |
+
model = AutoModelForCausalLM.from_pretrained(BASE, dtype=torch.bfloat16, device_map=device_map).eval()
|
| 68 |
+
adapter_dir = snapshot_download(repo, allow_patterns=["adapter/*"]) + "/adapter"
|
| 69 |
+
apply_tinker_lora(model, adapter_dir)
|
| 70 |
+
return model, tok
|
| 71 |
+
|
| 72 |
+
|
| 73 |
+
@torch.no_grad()
|
| 74 |
+
def p_human(model, tok, outline):
|
| 75 |
+
"""P(human) for one outline: one `[Role] content` line per item."""
|
| 76 |
+
ids = tok.encode(f"<|im_start|>system\n{SYSTEM}<|im_end|>\n<|im_start|>user\n{outline}{SUFFIX}",
|
| 77 |
+
add_special_tokens=False)
|
| 78 |
+
logits = model(torch.tensor([ids], device=model.device)).logits[0, -1].float()
|
| 79 |
+
return torch.softmax(logits[[HUMAN, AI]], -1)[0].item()
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
if __name__ == "__main__":
|
| 83 |
+
model, tok = load_model()
|
| 84 |
+
outline = ("[Central Development] A town's water supply fails after a drought, and residents organise to share wells.\n"
|
| 85 |
+
"[Background Context] The reservoir has been shrinking for three summers.\n"
|
| 86 |
+
"[Open Question] Whether the council will fund a new pipeline remains undecided.")
|
| 87 |
+
p = p_human(model, tok, outline)
|
| 88 |
+
print(f"P(human) = {p:.4f} -> {'flagged as AI ideas' if p <= CUT else 'not flagged'}")
|
model-00001-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3fe804f414a5d843c6251fe55dc8f2bc321a9cce419b5464111c84b46d9744af
|
| 3 |
+
size 4991210024
|
model-00002-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8be972149f62e35bbcf7dc8c42dc91848e1a577843f346505184e2cd44b4b599
|
| 3 |
+
size 4992601016
|
model-00003-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:62d5469981389ad3bda427468e2d44b30e1612c953ed6eefb4a80bd416f2b390
|
| 3 |
+
size 4992601368
|
model-00004-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6e76794ee715d8d1802a6b6d23b6be2df573f781cb1a349eaa8c56bf281629e6
|
| 3 |
+
size 4995692800
|
model-00005-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a59e0285a25bda86f4b8b7f1efaf43ab51b529438f2aa608c449e746645ce7a8
|
| 3 |
+
size 4980553832
|
model-00006-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7c457ef53f4e978bcecf873169c600810e9563c3bdd753840cb24f6f82fd0b90
|
| 3 |
+
size 4989423536
|
model-00007-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:443a75a7513f12bda18da2ba0016976a8ff06d43aab84f6d92a42a17b191d134
|
| 3 |
+
size 4992601488
|
model-00008-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e90d04559e6ca8db5e20728e01166a9a31d189d12d3d6e650cc0939cbafdc80f
|
| 3 |
+
size 4992601520
|
model-00009-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:00b570062a24d8b34d642e8e096dc8ba71ebe724ca76f1a6ebd263e7df55ae62
|
| 3 |
+
size 4995692800
|
model-00010-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:64953be2e2dddded2f05dd4dd76786d007a578e5885aa92a449d2d569cb3c543
|
| 3 |
+
size 4992601520
|
model-00011-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:181ee21382ea37d8c9048da21bdbb546b00dfcc63fa2347210c2acae4f1a93da
|
| 3 |
+
size 4995692800
|
model-00012-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:656665d1d8b7fa52590962e46d5824099d194a767c1a4b2aaa2c9e65f5bb9504
|
| 3 |
+
size 4995692816
|
model-00013-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:98fd2539a96c7b8dc2da205729effbf1a69ac210f1d949b2a0cf4389b2ef1c77
|
| 3 |
+
size 3249723504
|
model-00014-of-00014.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:64577b275ca4e7e5266eae0903674f7f46ec2a8cbf4f4f1a3207f80d503cd1d0
|
| 3 |
+
size 2670685240
|
model.safetensors.index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<s>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"eos_token": {
|
| 10 |
+
"content": "<|im_end|>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": {
|
| 17 |
+
"content": "<|im_end|>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"unk_token": {
|
| 24 |
+
"content": "<unk>",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
}
|
| 30 |
+
}
|
thresholds.json
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model": "rishanthrajendhran/IdeaLens-NoParaphrase",
|
| 3 |
+
"input": "outline",
|
| 4 |
+
"flag_rule": "flag the document as AI when P(human) <= cut",
|
| 5 |
+
"calibration": {
|
| 6 |
+
"data": "IdeaLens-1M, calibration split (human documents only)",
|
| 7 |
+
"scores_from": "the merged weights released in this repo, scored locally in bf16",
|
| 8 |
+
"n_humans": 80000,
|
| 9 |
+
"n_per_format": {
|
| 10 |
+
"Academic Writing": 10000,
|
| 11 |
+
"Creative Writing": 10000,
|
| 12 |
+
"Knowledge Article": 10000,
|
| 13 |
+
"News Article": 10000,
|
| 14 |
+
"Nonfiction Writing": 10000,
|
| 15 |
+
"Personal About Page": 10000,
|
| 16 |
+
"Personal Blog": 10000,
|
| 17 |
+
"User Reviews": 10000
|
| 18 |
+
},
|
| 19 |
+
"n_per_topic": {
|
| 20 |
+
"Art & Design": 3338,
|
| 21 |
+
"Crime & Law": 3931,
|
| 22 |
+
"Education & Jobs": 3974,
|
| 23 |
+
"Entertainment": 4692,
|
| 24 |
+
"Fashion & Beauty": 2999,
|
| 25 |
+
"Finance & Business": 4855,
|
| 26 |
+
"Food & Dining": 2696,
|
| 27 |
+
"Games": 4257,
|
| 28 |
+
"Hardware": 2253,
|
| 29 |
+
"Health": 5069,
|
| 30 |
+
"History": 2554,
|
| 31 |
+
"Home & Hobbies": 4192,
|
| 32 |
+
"Industrial": 2299,
|
| 33 |
+
"Literature": 3571,
|
| 34 |
+
"Politics": 3728,
|
| 35 |
+
"Religion": 3617,
|
| 36 |
+
"Science & Tech.": 4154,
|
| 37 |
+
"Social Life": 3126,
|
| 38 |
+
"Software": 2257,
|
| 39 |
+
"Software Dev.": 2468,
|
| 40 |
+
"Sports & Fitness": 4224,
|
| 41 |
+
"Transportation": 2810,
|
| 42 |
+
"Travel": 2936
|
| 43 |
+
}
|
| 44 |
+
},
|
| 45 |
+
"method": {
|
| 46 |
+
"global": "the target-FPR quantile of P(human) over all calibration humans",
|
| 47 |
+
"per_group": "the group's own quantile, shrunk toward the global cut with weight n / (n + 2500)",
|
| 48 |
+
"min_group_humans": 200,
|
| 49 |
+
"estimability": "a cut at FPR q is given only when q * n >= 25 calibration humans",
|
| 50 |
+
"missing_cut": "no cut for a group means none could be estimated; do not substitute the global cut"
|
| 51 |
+
},
|
| 52 |
+
"fpr_targets": [
|
| 53 |
+
0.001,
|
| 54 |
+
0.005,
|
| 55 |
+
0.01,
|
| 56 |
+
0.02,
|
| 57 |
+
0.05
|
| 58 |
+
],
|
| 59 |
+
"global": {
|
| 60 |
+
"0.001": 0.005384853958339764,
|
| 61 |
+
"0.005": 0.03358698994313534,
|
| 62 |
+
"0.01": 0.09947020787557571,
|
| 63 |
+
"0.02": 0.5039061705290805,
|
| 64 |
+
"0.05": 0.9473810516663606
|
| 65 |
+
},
|
| 66 |
+
"per_format": {
|
| 67 |
+
"0.005": {
|
| 68 |
+
"Academic Writing": 0.17216314716685993,
|
| 69 |
+
"Creative Writing": 0.3662160531627341,
|
| 70 |
+
"Knowledge Article": 0.02454634706938552,
|
| 71 |
+
"News Article": 0.028123206732030795,
|
| 72 |
+
"Nonfiction Writing": 0.016817357478891553,
|
| 73 |
+
"Personal About Page": 0.05767136910755699,
|
| 74 |
+
"Personal Blog": 0.10742873177223775,
|
| 75 |
+
"User Reviews": 0.15260353567912108
|
| 76 |
+
},
|
| 77 |
+
"0.01": {
|
| 78 |
+
"Academic Writing": 0.6119850970645432,
|
| 79 |
+
"Creative Writing": 0.6022245427590303,
|
| 80 |
+
"Knowledge Article": 0.05112801696535962,
|
| 81 |
+
"News Article": 0.07551940581028012,
|
| 82 |
+
"Nonfiction Writing": 0.04034312052429626,
|
| 83 |
+
"Personal About Page": 0.2325741109691407,
|
| 84 |
+
"Personal Blog": 0.47574548977669645,
|
| 85 |
+
"User Reviews": 0.3578672876227978
|
| 86 |
+
},
|
| 87 |
+
"0.02": {
|
| 88 |
+
"Academic Writing": 0.8589840892409853,
|
| 89 |
+
"Creative Writing": 0.8079607867126872,
|
| 90 |
+
"Knowledge Article": 0.16982042496739946,
|
| 91 |
+
"News Article": 0.3361014661410378,
|
| 92 |
+
"Nonfiction Writing": 0.14607681811844042,
|
| 93 |
+
"Personal About Page": 0.6548414388541375,
|
| 94 |
+
"Personal Blog": 0.7900118073388407,
|
| 95 |
+
"User Reviews": 0.7621506676545696
|
| 96 |
+
},
|
| 97 |
+
"0.05": {
|
| 98 |
+
"Academic Writing": 0.9843446823102748,
|
| 99 |
+
"Creative Writing": 0.9699377397101625,
|
| 100 |
+
"Knowledge Article": 0.7910862604485897,
|
| 101 |
+
"News Article": 0.8612633908883776,
|
| 102 |
+
"Nonfiction Writing": 0.743589796841061,
|
| 103 |
+
"Personal About Page": 0.9437852253526873,
|
| 104 |
+
"Personal Blog": 0.9716472633629923,
|
| 105 |
+
"User Reviews": 0.9735735300997738
|
| 106 |
+
}
|
| 107 |
+
},
|
| 108 |
+
"per_topic": {
|
| 109 |
+
"0.005": {
|
| 110 |
+
"Health": 0.02665696794661508
|
| 111 |
+
},
|
| 112 |
+
"0.01": {
|
| 113 |
+
"Art & Design": 0.19179490825513668,
|
| 114 |
+
"Crime & Law": 0.1545145294205277,
|
| 115 |
+
"Education & Jobs": 0.10005740179860542,
|
| 116 |
+
"Entertainment": 0.10123568468788725,
|
| 117 |
+
"Fashion & Beauty": 0.27768413068085457,
|
| 118 |
+
"Finance & Business": 0.050734614106130005,
|
| 119 |
+
"Food & Dining": 0.13380622041490592,
|
| 120 |
+
"Games": 0.08438404653501116,
|
| 121 |
+
"Health": 0.06339366239605145,
|
| 122 |
+
"History": 0.48362816444056334,
|
| 123 |
+
"Home & Hobbies": 0.15587984819752723,
|
| 124 |
+
"Literature": 0.3373619592568417,
|
| 125 |
+
"Politics": 0.14492108917514784,
|
| 126 |
+
"Religion": 0.08966523650277478,
|
| 127 |
+
"Science & Tech.": 0.07745924258865121,
|
| 128 |
+
"Social Life": 0.13181006668386752,
|
| 129 |
+
"Sports & Fitness": 0.1920630245014839,
|
| 130 |
+
"Transportation": 0.12046734651780304,
|
| 131 |
+
"Travel": 0.11693166984556584
|
| 132 |
+
},
|
| 133 |
+
"0.02": {
|
| 134 |
+
"Art & Design": 0.6284591030746229,
|
| 135 |
+
"Crime & Law": 0.6611839703198765,
|
| 136 |
+
"Education & Jobs": 0.45501643442833967,
|
| 137 |
+
"Entertainment": 0.4548890511046284,
|
| 138 |
+
"Fashion & Beauty": 0.6978008965369162,
|
| 139 |
+
"Finance & Business": 0.21864830862043488,
|
| 140 |
+
"Food & Dining": 0.6699928992936147,
|
| 141 |
+
"Games": 0.38033045393989123,
|
| 142 |
+
"Hardware": 0.6323141822811568,
|
| 143 |
+
"Health": 0.2776615271356264,
|
| 144 |
+
"History": 0.734295973796192,
|
| 145 |
+
"Home & Hobbies": 0.6196655919922738,
|
| 146 |
+
"Industrial": 0.3703898218041191,
|
| 147 |
+
"Literature": 0.7246250279042247,
|
| 148 |
+
"Politics": 0.6361724103395298,
|
| 149 |
+
"Religion": 0.5985515346284275,
|
| 150 |
+
"Science & Tech.": 0.38602130217151465,
|
| 151 |
+
"Social Life": 0.5687486373093052,
|
| 152 |
+
"Software": 0.40516721829317437,
|
| 153 |
+
"Software Dev.": 0.45919684576920805,
|
| 154 |
+
"Sports & Fitness": 0.6547269797506594,
|
| 155 |
+
"Transportation": 0.6111439857345478,
|
| 156 |
+
"Travel": 0.6217189547991822
|
| 157 |
+
},
|
| 158 |
+
"0.05": {
|
| 159 |
+
"Art & Design": 0.9549211242006862,
|
| 160 |
+
"Crime & Law": 0.9683806173907001,
|
| 161 |
+
"Education & Jobs": 0.9259304789693195,
|
| 162 |
+
"Entertainment": 0.9394194723380223,
|
| 163 |
+
"Fashion & Beauty": 0.9615725468619022,
|
| 164 |
+
"Finance & Business": 0.7231349175669055,
|
| 165 |
+
"Food & Dining": 0.9672438690621314,
|
| 166 |
+
"Games": 0.9211352733763646,
|
| 167 |
+
"Hardware": 0.9562895651759757,
|
| 168 |
+
"Health": 0.8940531615491903,
|
| 169 |
+
"History": 0.9718710969119697,
|
| 170 |
+
"Home & Hobbies": 0.9552403326066375,
|
| 171 |
+
"Industrial": 0.9413230867039313,
|
| 172 |
+
"Literature": 0.9672114632363698,
|
| 173 |
+
"Politics": 0.963575067014845,
|
| 174 |
+
"Religion": 0.9661166095070377,
|
| 175 |
+
"Science & Tech.": 0.9546518678503014,
|
| 176 |
+
"Social Life": 0.933623815852447,
|
| 177 |
+
"Software": 0.9180651875574712,
|
| 178 |
+
"Software Dev.": 0.9347538496353965,
|
| 179 |
+
"Sports & Fitness": 0.9513339148722936,
|
| 180 |
+
"Transportation": 0.9554580679177035,
|
| 181 |
+
"Travel": 0.9530263127959078
|
| 182 |
+
}
|
| 183 |
+
}
|
| 184 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:623c34567aebb18582765289fbe23d901c62704d6518d71866e0e58db892b5b7
|
| 3 |
+
size 17077484
|
tokenizer_config.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|