body-judge-small-v1
a dual-head model for filtering and evaluating AI responses
2 min read
The model is built on mmBERT-small and handles two tasks simultaneously when processing text from language models. It identifies the boundaries of useful text (cleaning the response from extra prefixes, reasoning, and off-topic blocks) and simultaneously evaluates each sentence on a scale from 0 to 1, showing how strongly it needs to be rewritten. This tool comes in handy for developers of generative content post-processing pipelines, auto-filtering systems, or LLM response auto-reviewers.
Key features
- Dual-head architecture: simultaneous detection of the main text span and calculation of a revision quality score for each sentence.
- Various precision options: weights available in fp32, fp16, and dynamic int8 for running on CPUs or GPUs.
- ONNX support: models easily export to ONNX format and ONNX Runtime for cross-platform deployment.
- Sliding window: support for processing long texts using configurable window_tokens and stride_tokens parameters.
What you can do
- Generation cleaning: automatically cut service reasoning blocks and technical prefixes out of LLM responses.
- Text quality control: evaluate generated articles or responses for sentences that need editing.
- Backend integration: embed the model into a chatbot verification pipeline using ready-made PyTorch or ONNX scripts.
Example
python infer.py --ckpt ./model_fp16.pt --device cuda --text_file reply.txtRead more
DetailsBase model: alphaedge-ai/mmBERT-small-zho-32768 (ModernBERT-small)
Metrics: Main text IoU 0.9900, Sentence evaluation Spearman 0.7016
License: MIT
Languages: Chinese, English










Comments