Text Ranking
sentence-transformers
ONNX
Safetensors
Transformers.js
modernbert
text-classification
reranker
cross-encoder
rerank
rag
retrieval
chinese
japanese
korean
distillation
text-embeddings-inference
Instructions to use CheezOne/reranker-cjk-small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use CheezOne/reranker-cjk-small with sentence-transformers:
from sentence_transformers import CrossEncoder model = CrossEncoder("CheezOne/reranker-cjk-small") query = "Which planet is known as the Red Planet?" passages = [ "Venus is often called Earth's twin because of its similar size and proximity.", "Mars, known for its reddish appearance, is often referred to as the Red Planet.", "Jupiter, the largest planet in our solar system, has a prominent red spot.", "Saturn, famous for its rings, is sometimes mistaken for the Red Planet." ] scores = model.predict([(query, passage) for passage in passages]) print(scores) - Transformers.js
How to use CheezOne/reranker-cjk-small with Transformers.js:
// npm i @huggingface/transformers import { AutoTokenizer, AutoModelForSequenceClassification } from '@huggingface/transformers'; const tokenizer = await AutoTokenizer.from_pretrained('CheezOne/reranker-cjk-small'); const model = await AutoModelForSequenceClassification.from_pretrained('CheezOne/reranker-cjk-small'); const query = 'Which planet is known as the Red Planet?'; const documents = [ 'Mars, known for its reddish appearance, is often referred to as the Red Planet.', 'Venus is often called the twin of Earth because of its similar size and proximity.', ]; const inputs = tokenizer(new Array(documents.length).fill(query), { text_pair: documents, padding: true, truncation: true }); const { logits } = await model(inputs); console.log(logits.sigmoid().tolist()); // one relevance score per document - Notebooks
- Google Colab
- Kaggle
Link to renamed PI guard
Browse files
README.md
CHANGED
|
@@ -129,5 +129,5 @@ Data: T2Ranking, Mr. TyDi; evaluation: MIRACL (via MTEB).
|
|
| 129 |
Small open models for Chinese / Japanese / Korean / English apps. All of them run on CPU, and most in the browser.
|
| 130 |
|
| 131 |
- [pii-detector-cjk-small](https://huggingface.co/CheezOne/pii-detector-cjk-small): PII detector (zh/ja/ko/en): find and redact names, phones, IDs, addresses. ONNX, runs on CPU and in the browser
|
| 132 |
-
- [prompt-injection-
|
| 133 |
- [pixel-art-sprite-generator-16x16](https://huggingface.co/CheezOne/pixel-art-sprite-generator-16x16): Pixel sprite generator: text → 16×16 game sprites, in your browser ([demo](https://huggingface.co/spaces/CheezOne/pixel-art-sprite-generator-demo))
|
|
|
|
| 129 |
Small open models for Chinese / Japanese / Korean / English apps. All of them run on CPU, and most in the browser.
|
| 130 |
|
| 131 |
- [pii-detector-cjk-small](https://huggingface.co/CheezOne/pii-detector-cjk-small): PII detector (zh/ja/ko/en): find and redact names, phones, IDs, addresses. ONNX, runs on CPU and in the browser
|
| 132 |
+
- [prompt-injection-guard-cjk-small](https://huggingface.co/CheezOne/prompt-injection-guard-cjk-small): Prompt-injection / jailbreak detector (zh/ja/ko/en): a guardrail for LLM apps
|
| 133 |
- [pixel-art-sprite-generator-16x16](https://huggingface.co/CheezOne/pixel-art-sprite-generator-16x16): Pixel sprite generator: text → 16×16 game sprites, in your browser ([demo](https://huggingface.co/spaces/CheezOne/pixel-art-sprite-generator-demo))
|