Downloads · 30 days
11
7% of all-time downloads
meet447/bakwas-v1-alpha
bakwas-v1-alpha is a token classification model from meet447. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as apache-2.0.
Bakwas (Hindi for "Noise" or "Nonsense") is a high-performance, extractive prompt compression model designed to identify and strip redundant tokens from LLM prompts. By acting as a semantic filter, it reduces "Bloat T…
Downloads · 30 days
11
7% of all-time downloads
All-time downloads
150
Public
Parameters
66.4M
265 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors265 MB · 100%
From the Hugging Face model README
Bakwas (Hindi for "Noise" or "Nonsense") is a high-performance, extractive prompt compression model designed to identify and strip redundant tokens from LLM prompts. By acting as a semantic filter, it reduces "Bloat Tax"—saving costs and reducing KV-cache latency in downstream LLM workflows.
Bakwas v1 Alpha is a token classification model fine-tuned from distilbert-base-uncased. Unlike generative compressors that rewrite text, Bakwas is purely extractive. It predicts a binary mask for every token: Keep (Signal) or Discard (Bakwas). This ensures that the original prompt's structure remains familiar to the downstream LLM's training data.
The model is intended to sit as a middleware/proxy between the user and an LLM API.
Users should implement a "Structure Guard" (keeping punctuation) and a "Heuristic Heal" script to re-join fragments and ensure the output is readable for the downstream LLM.
from transformers import AutoTokenizer, AutoModelForTokenClassification
import torch
tokenizer = AutoTokenizer.from_pretrained("meet447/bakwas-v1-alpha")
model = AutoModelForTokenClassification.from_pretrained("meet447/bakwas-v1-alpha")
prompt = "Actually, I was just wondering if you could potentially help me with a small tiny Python script."
inputs = tokenizer(prompt, return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
# 1 = Keep, 0 = Bakwas
predictions = torch.argmax(logits, dim=-1)