learner-subodh commited on
Commit
bdec67b
·
verified ·
1 Parent(s): b58a305

Upload trained Offline Delivery Assistant SLM

Browse files
Files changed (3) hide show
  1. README.md +52 -0
  2. config.json +16 -0
  3. pytorch_model.bin +3 -0
README.md ADDED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: mit
5
+ tags:
6
+ - small-language-model
7
+ - slm
8
+ - pytorch
9
+ - edge-ai
10
+ - logistics
11
+ - customer-support
12
+ - delivery-assistant
13
+ pipeline_tag: text-generation
14
+ widget:
15
+ - text: "<|user|> Customer is asking to change delivery address after order pickup. <|assistant|>"
16
+ ---
17
+
18
+ # Delivery-Rider-Assistant-SLM (30.0M Parameters)
19
+
20
+ ## Overview
21
+ Delivery-Rider-Assistant-SLM is a lightweight Small Language Model (SLM) trained from scratch, intended for offline use on low-power mobile devices by delivery partners and drivers (e.g., Swiggy, Zomato, Porter).
22
+
23
+ ## Intended Use Case
24
+ - Offline edge execution in areas with poor connectivity.
25
+ - Quick responses for address changes, payment status checks, COD handling, and order issues.
26
+
27
+ ## Model Details & Architecture
28
+ - Architecture: Decoder-only causal transformer (nanoGPT-style, flash attention)
29
+ - Parameters: ~30.0 million
30
+ - Layers: 6
31
+ - Attention heads: 8
32
+ - Embedding dimension: 384
33
+ - Context length: 256 tokens
34
+ - Tokenizer: BPE (GPT-2 encoding via tiktoken)
35
+
36
+ ## Training Setup
37
+ - Hardware: Single NVIDIA Tesla T4 GPU (Google Colab Free Tier)
38
+ - Training time: ~23 minutes
39
+ - Precision: Mixed precision (float16 AMP)
40
+ - Optimizer: AdamW (lr=6e-4, weight_decay=0.1, cosine schedule with warmup)
41
+ - Best validation loss: 0.7974
42
+ - Data: Bitext customer-support instruction dataset
43
+
44
+ ## How to Load in PyTorch
45
+ ```python
46
+ import torch
47
+ from huggingface_hub import hf_hub_download
48
+
49
+ weights_path = hf_hub_download(repo_id="learner-subodh/Delivery-Rider-Assistant-SLM", filename="pytorch_model.bin")
50
+ # Re-create the GPT class and GPTConfig from the training notebook, then:
51
+ # model.load_state_dict(torch.load(weights_path, map_location="cpu"))
52
+ ```
config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "GPT"
4
+ ],
5
+ "model_type": "nanogpt-custom",
6
+ "vocab_size": 50257,
7
+ "block_size": 256,
8
+ "n_embd": 384,
9
+ "n_layer": 6,
10
+ "n_head": 8,
11
+ "dropout": 0.1,
12
+ "bias": true,
13
+ "tokenizer": "tiktoken gpt2",
14
+ "task": "causal-lm",
15
+ "domain": "Logistics & Offline Delivery Partner Assistance"
16
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9192739d562b053780906c8d33727a9e3dd321f1335fd833bbab861c8d188984
3
+ size 120207595