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
Download thresholds.json from rishanthrajendhran/ProseLens: direct link, hf CLI and curl.
- Browser
- Download file 2.64 kB
-
https://huggingface.co/rishanthrajendhran/ProseLens/resolve/main/thresholds.json
- Command line
-
hf download hf://rishanthrajendhran/ProseLens/thresholds.json
-
curl -L -o thresholds.json https://huggingface.co/rishanthrajendhran/ProseLens/resolve/main/thresholds.json
2.64 kB
| { | |
| "model": "rishanthrajendhran/ProseLens", | |
| "input": "document", | |
| "flag_rule": "flag the document as AI when P(human) < cut", | |
| "calibration": { | |
| "data": "WildOutlines, calibration split (human documents only)", | |
| "scores_from": "the training checkpoint, scored on Tinker", | |
| "n_humans": 80000, | |
| "n_per_format": { | |
| "Academic Writing": 10000, | |
| "Creative Writing": 10000, | |
| "Knowledge Article": 10000, | |
| "News Article": 10000, | |
| "Nonfiction Writing": 10000, | |
| "Personal About Page": 10000, | |
| "Personal Blog": 10000, | |
| "User Reviews": 10000 | |
| } | |
| }, | |
| "method": { | |
| "global": "the target-FPR quantile of P(human) over all calibration humans", | |
| "per_group": "the group's own quantile, shrunk toward the global cut with weight n / (n + 2500)", | |
| "min_group_humans": 200, | |
| "estimability": "a cut at FPR q is given only when q * n >= 25 calibration humans", | |
| "missing_cut": "no cut for a group means none could be estimated; do not substitute the global cut" | |
| }, | |
| "fpr_targets": [ | |
| 0.001, | |
| 0.005, | |
| 0.01, | |
| 0.02, | |
| 0.05 | |
| ], | |
| "global": { | |
| "0.001": 0.07081838771272196, | |
| "0.005": 0.30468918373143306, | |
| "0.01": 0.6053894506737609, | |
| "0.02": 0.925022270529183, | |
| "0.05": 0.998888189099037 | |
| }, | |
| "per_format": { | |
| "0.005": { | |
| "Academic Writing": 0.7778763017339165, | |
| "Creative Writing": 0.8492284331725566, | |
| "Knowledge Article": 0.24235805929603155, | |
| "News Article": 0.2955419059997487, | |
| "Nonfiction Writing": 0.14387439727844545, | |
| "Personal About Page": 0.4169940435489798, | |
| "Personal Blog": 0.6827533426351194, | |
| "User Reviews": 0.6213508153913166 | |
| }, | |
| "0.01": { | |
| "Academic Writing": 0.8996738533714292, | |
| "Creative Writing": 0.9174860344190486, | |
| "Knowledge Article": 0.3804974222436696, | |
| "News Article": 0.555354294854766, | |
| "Nonfiction Writing": 0.27050169337460295, | |
| "Personal About Page": 0.7871415559941629, | |
| "Personal Blog": 0.8799318831045015, | |
| "User Reviews": 0.8516071157574004 | |
| }, | |
| "0.02": { | |
| "Academic Writing": 0.9827934935442895, | |
| "Creative Writing": 0.9841078402345083, | |
| "Knowledge Article": 0.6404405355320586, | |
| "News Article": 0.9037969402135294, | |
| "Nonfiction Writing": 0.494985268248519, | |
| "Personal About Page": 0.9772992347199888, | |
| "Personal Blog": 0.9816307917983351, | |
| "User Reviews": 0.9803463940922453 | |
| }, | |
| "0.05": { | |
| "Academic Writing": 0.9996898375219624, | |
| "Creative Writing": 0.9995782080959261, | |
| "Knowledge Article": 0.952949484412262, | |
| "News Article": 0.997881027494693, | |
| "Nonfiction Writing": 0.9393488591865028, | |
| "Personal About Page": 0.9996622303035176, | |
| "Personal Blog": 0.999661233340514, | |
| "User Reviews": 0.9996383495931975 | |
| } | |
| } | |
| } | |