Downloads · 30 days
0
Shanvit/askbit-faq-retriever
askbit-faq-retriever is a text classification model from Shanvit. Use it when you need a label for a piece of text. The card lists the license as mit.
A fast, interpretable FAQ retriever using bit vector encoding of SBERT sentence embeddings combined with a binary KNN classifier. This repository hosts a model artifact from the AskBit project.
Downloads · 30 days
0
Access
Public
Updated Jul 28, 2025
Repo size
528 KB
Likes
0
Public
Click a slice to open those files.
.pkl171 KB · 92%
From the Hugging Face model README
A fast, interpretable FAQ retriever using bit vector encoding of SBERT sentence embeddings combined with a binary KNN classifier. This repository hosts a model artifact from the AskBit project.
📚 This model was created as part of an educational journey exploring efficient semantic FAQ matching with bitwise vector representations and KNN classification.
all-MiniLM-L6-v2) to embed question-answer pairs as dense semantic vectors.model.pklfaq.json| File | Description |
|---|---|
model.pkl | Trained KNN classifier model over SBERT-based bit vectors. |
faq.json | FAQ question-answer dataset used for training and evaluation. |
requirements.txt | Python dependencies to load and use the model. |
README.md | Model usage instructions, background, and examples. |
SbertBitEncoder)all-MiniLM-L6-v2) to generate dense semantic embeddings of entire question-answer pairs.FAQClassifier)import pickle
import numpy as np
# Load the trained model artifact
with open("model.pkl", "rb") as f:
model = pickle.load(f)
# Bit vector input: binarized SBERT embeddings (e.g., 384-bit vector)
query_vec = np.array([1, 0, 1, 1, 0, ..., 0]) # Must match training bit vector format
# Predict (get best matching answer)
answer = model.predict(query_vec)
print("Predicted answer:", answer)
⚠️ Important: Ensure you encode new queries with the same SBERT bit-vector encoder used at training for consistent results.
Install dependencies with:
pip install -r requirements.txt
Main dependencies:
sentence-transformersscikit-learnnumpyyakespacy (for optional text preprocessing)This model is part of the AskBit project on GitHub:
MIT License — free to use, modify, or contribute.
This model is intended for learning and experimentation. Feel free to fork, improve, or build upon it!
Model trained and shared by @Shanvit