This is a 109M parameter model fine-tuned to detect human vs. gpt-written texts. It outputs a score ranging from 0 (GPT-written) to 1 (Human-written). However, occasionally it can output a value slightly outside of that range, such as 1.01 or -0.013
Example Inference Code
from transformers import AutoModelForSequenceClassification, AutoTokenizer
# Load the model and tokenizer from the Hugging Face Hub
model_name = "qingy2024/human-ai-bert"
model = AutoModelForSequenceClassification.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
# Example text to classify
text = "Quantum mechanics is a fundamental branch of physics that describes the behavior of particles on very small scales, such as atoms and subatomic particles. It differs significantly from classical mechanics, which governs macroscopic objects, because it introduces concepts like wave-particle duality, uncertainty, and probabilistic outcomes."# Tokenize the text
inputs = tokenizer(text, truncation=True, max_length=512, padding=True, return_tensors="pt")
import torch
# Perform inferencewith torch.no_grad(): # Disable gradient computation for inference
outputs = model(**inputs)
prediction = outputs.logits.item() # Extract the single float value# Interpret the resultprint(f"Prediction score: {prediction:.3f}")
if prediction >= 0.5:
print("Text is likely human-written.")
else:
print("Text is likely GPT-written.")
Output
Prediction score: 0.145
Text is likely GPT-written.
Runs of qingy2024 HAID-109M on huggingface.co
11
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
8
30-day runs
More Information About HAID-109M huggingface.co Model
HAID-109M huggingface.co is an AI model on huggingface.co that provides HAID-109M's model effect (), which can be used instantly with this qingy2024 HAID-109M model. huggingface.co supports a free trial of the HAID-109M model, and also provides paid use of the HAID-109M. Support call HAID-109M model through api, including Node.js, Python, http.
HAID-109M huggingface.co is an online trial and call api platform, which integrates HAID-109M's modeling effects, including api services, and provides a free online trial of HAID-109M, you can try HAID-109M online for free by clicking the link below.
qingy2024 HAID-109M online free url in huggingface.co:
HAID-109M is an open source model from GitHub that offers a free installation service, and any user can find HAID-109M on GitHub to install. At the same time, huggingface.co provides the effect of HAID-109M install, users can directly use HAID-109M installed effect in huggingface.co for debugging and trial. It also supports api for free installation.