Store-1-Search / README.md
Softsasi's picture
Update README.md
11e3337 verified
|
Raw History Blame Contribute Delete
8.86 kB
---
base_model:
- unsloth/Qwen3.5-0.8B
datasets:
- Softsasi/Store-1-Search-Dataset
library_name: transformers
pipeline_tag: text-generation
license: apache-2.0
language:
- en
- bn
tags:
- text-generation-inference
- transformers
- unsloth
- qwen3_5
- trl
- lora
- merged
- semantic-search
- reranker
- query-expansion
- structured-output
- json
- softsasi
- softsasi-store
- bangla
- banglish
- bangladesh
- open-weight
model-index:
- name: Store-1-Search
results:
- task:
type: text-generation
name: Multilingual Store Search & Reranking
dataset:
type: Softsasi/Store-1-Search-Dataset
name: Store-1-Search-Dataset (Validation Split)
split: validation
metrics:
- type: loss
name: Validation Loss (checkpoint-40)
value: 0.1889
- type: loss
name: Training Loss (checkpoint-40)
value: 0.0783
---
# Store-1-Search (`0.8B` Merged Multilingual Store Search & Reranker)
**Store-1-Search** (`Softsasi/Store-1-Search`) is a lightweight **sub-1B (`873.4M` parameters)** merged 16-bit model fine-tuned by **[Softsasi](https://huggingface.co/Softsasi)** on [`unsloth/Qwen3.5-0.8B`](https://huggingface.co/unsloth/Qwen3.5-0.8B) via LoRA (`r=16`, `alpha=16`, language layers only) and merged from **`checkpoint-40`** (strictly lowest evaluation loss).
Designed specifically to scale **[Softsasi Store](https://huggingface.co/Softsasi)** search (`lib/data/services/openai_service.dart` -> `aiSearch()`) cleanly across **English, Bangla (`বাংলা`), and Romanized Banglish** queries with strict, zero-thinking raw JSON output:
1. **Semantic App Search (`aiSearch` JSON Array):** Maps natural-language queries (including Banglish like `"current kokhon jabe load shedding schedule dekhbo"`) against catalog summaries to a ranked raw JSON array of matching IDs (`["load-shedding-schedular"]`, or `[]`).
2. **Multilingual Query Expansion (`query_expand`):** Decomposes ambiguous user queries (`"dark mode bangla news reading app"`) into structured Softsasi Store filters (`{"categories": [...], "subcategories": [...], "keywords": [...]}`) across all 6 Store categories (`Apps`, `Games`, `Websites`, `Assets`, `Themes`, `Plugins`).
3. **Scalable Candidate Reranking (`rerank`):** Reranks shortlisted candidates into ordered JSON ID arrays as catalog sizes grow past 100+ listings.
> **Quantized GGUF (`Q4_K_M` `547 MB` & `Q8_0` `834 MB`):** [`Softsasi/Store-1-Search-GGUF`](https://huggingface.co/Softsasi/Store-1-Search-GGUF) (`ollama run hf.co/Softsasi/Store-1-Search-GGUF:Q4_K_M`)
> **Training Dataset (`900` train / `90` validation, Zero-PII):** [`Softsasi/Store-1-Search-Dataset`](https://huggingface.co/datasets/Softsasi/Store-1-Search-Dataset)
> **Publisher Companion (24B ASO & Legal Policies):** [`Softsasi/Store-1-Publisher`](https://huggingface.co/Softsasi/Store-1-Publisher)
---
## Training & Evaluation Summary
- **Base Model:** `unsloth/Qwen3.5-0.8B` (`Qwen3_5ForConditionalGeneration`, `248,320` vocab, `262,144` max context)
- **Method:** `LoRA` (16-bit base, `Train as: Language model`, `finetune_vision_layers: false`, `r=16`, `alpha=16`, `dropout=0`)
- **Schedule & Compute:** `2× Tesla T4` DDP (`batch_size=1`, `gradient_accumulation_steps=8`, `max_seq_length=2048`, `packing=true`, `train_on_completions=true`, `lr=2e-4`, `warmup_steps=6`, `max_steps=60`, elapsed `6m 11s`, `852,471` tokens)
- **Exported Checkpoint:** **`checkpoint-40`** (lowest validation loss)
| Checkpoint / Step | Train Loss | Eval Loss (Studio Chart) | Status |
| :--- | :--- | :--- | :--- |
| Step 1 | `0.474711` | — | Initial warmup |
| Step 20 (`checkpoint-20`) | `0.239327` | `~0.1900` | Saved |
| **Step 40 (`checkpoint-40`)** | **`0.078323`** | **`~0.1889`** | **Exported (Best Eval)** |
| Step 60 (`checkpoint-60`) | `0.059280` | `~0.1940` | Completed (`avg=0.2024`) |
---
## Quickstart (`OpenAI` SDK / `vLLM` / `transformers`)
Serve via `vllm serve Softsasi/Store-1-Search` or `llama-server`, then call with `enable_thinking: False`:
```python
from openai import OpenAI
client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")
resp = client.chat.completions.create(
model="Softsasi/Store-1-Search",
messages=[
{
"role": "system",
"content": "You are Softsasi Store AI Search, an ultra-fast multilingual (English, Bangla, Banglish) intent analyzer and semantic app matcher for Softsasi Store. Output ONLY raw valid JSON (no markdown fences, no <think> tags, no prose).",
},
{
"role": "user",
"content": (
"Expand this Softsasi Store user search query into structured search filters across Apps, Games, Websites, Assets, Themes, Plugins.\n"
'Query: "dark mode bangla news reading app"\n'
"Return ONLY raw JSON with keys categories, subcategories, keywords."
),
},
],
temperature=0.1,
max_tokens=160,
extra_body={"chat_template_kwargs": {"enable_thinking": False}},
)
print(resp.choices[0].message.content)
# {"categories": ["Websites"], "subcategories": ["Blog", "News"], "keywords": ["news", "blog", "reading"]}
```
Or load directly in Python with Hugging Face `transformers`:
```python
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer
model_id = "Softsasi/Store-1-Search"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
)
messages = [
{
"role": "system",
"content": "You are Softsasi Store AI Search, an ultra-fast multilingual (English, Bangla, Banglish) intent analyzer and semantic app matcher for Softsasi Store. Output ONLY raw valid JSON (no markdown fences, no <think> tags, no prose).",
},
{
"role": "user",
"content": (
'Rerank Softsasi Store search candidates by semantic intent (EN/BN/Banglish support).\n'
'Query: "current kokhon jabe load shedding schedule dekhbo"\n'
'Candidates: [{"id": "softsasi-invoice-maker", "name": "Softsasi Invoice Maker", "category": "Apps", "tags": ["billing", "pdf"]}, {"id": "load-shedding-schedular", "name": "Load Shedding Schedular", "category": "Websites", "tags": ["electricity", "bangladesh", "schedule"]}, {"id": "muslim-pro-bangla", "name": "Muslim Pro Bangla", "category": "Apps", "tags": ["prayer", "quran"]}]\n'
"Return ONLY a JSON array of matching IDs ordered by relevance."
),
},
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True,
enable_thinking=False,
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=96, do_sample=False)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[-1]:], skip_special_tokens=True))
# ["load-shedding-schedular"]
```
## Intended Use & Limitations
- Built strictly on public, zero-PII Softsasi Store catalog listings and synthetic category examples across Apps, Games, Websites, Assets, Themes, and Plugins.
- Intended for low-latency semantic catalog retrieval, filter expansion, and candidate reranking with non-thinking JSON decoding (`enable_thinking=False`).
---
## Ecosystem & Related Links
- **Live Production App:** [Softsasi Store](https://store.softsasi.com)
- **GitHub Repo:** [Softsasi/Store-1-Search](https://github.com/Softsasi/Store-1-Search) · [Unified Suite](https://github.com/Softsasi/-Softsasi-AI-Suite)
- **Ollama:** [`ollama run Softsasi/store-1-search`](https://ollama.com/Softsasi/store-1-search)
- **Kaggle:** [Model](https://www.kaggle.com/models/shakilanowersamrat/store-1-search) · [Dataset (10.0)](https://www.kaggle.com/datasets/shakilanowersamrat/store-1-search-dataset) · [Notebook](https://www.kaggle.com/code/shakilanowersamrat/store-1-search-0-8b-gguf-multilingual-store-sear)
- **Hugging Face Demo Space:** [Softsasi/Store-1-Search-Demo](https://huggingface.co/spaces/Softsasi/Store-1-Search-Demo)
---
## Connect with Softsasi
**Softsasi** — *Bangladesh's #1 Open-Weight LLM & Enterprise AI Development Company*
- **Website:** [softsasi.com](https://www.softsasi.com) · [Directory](https://www.softsasi.com/sitemap)
- **GitHub:** [github.com/Softsasi](https://github.com/Softsasi) · [Unified Suite](https://github.com/Softsasi/-Softsasi-AI-Suite)
- **Ollama:** [ollama.com/Softsasi](https://ollama.com/Softsasi)
- **Kaggle:** [kaggle.com/shakilanowersamrat](https://www.kaggle.com/shakilanowersamrat) · [Collection](https://www.kaggle.com/work/collections/19710065)
- **Social:** [LinkedIn](https://linkedin.com/company/softsasi) · [YouTube](https://www.youtube.com/@softsasillc) · [X](https://x.com/Softsasillc) · [Facebook](https://www.facebook.com/softsasi)