umr2015 commited on
Commit
043ea03
·
verified ·
1 Parent(s): dcb0d04

Add submission pack and MiniCPM5 llama.cpp runtime

Browse files
Files changed (5) hide show
  1. FIELD_NOTES.md +14 -1
  2. README.md +10 -9
  3. SUBMISSION.md +80 -0
  4. app.py +6 -0
  5. requirements.txt +2 -0
FIELD_NOTES.md CHANGED
@@ -19,6 +19,20 @@ time windows, waiting time, lateness, and a manual baseline comparison.
19
  - Its model card highlights local deployment, tool use, long context, and
20
  compact agent workflows, which fit this route-coaching task.
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  ## What the model does
23
 
24
  MiniCPM5 receives dispatcher notes such as:
@@ -49,4 +63,3 @@ model invent routes or metrics.
49
  The demo data is synthetic. The app stores nothing, uses no cloud LLM API, and
50
  does not require user secrets. Uploaded CSVs are processed only during the
51
  Gradio session.
52
-
 
19
  - Its model card highlights local deployment, tool use, long context, and
20
  compact agent workflows, which fit this route-coaching task.
21
 
22
+ ## Competition fit
23
+
24
+ The project is intentionally small in both model size and product scope. It is
25
+ not a general logistics platform. It handles one common small-business workflow:
26
+ read the daily order sheet, interpret the dispatcher note, and produce a route
27
+ plan that a human can audit.
28
+
29
+ This directly targets the hackathon signals:
30
+
31
+ - Backyard AI: practical helper for a local delivery operator.
32
+ - Off the Grid: no cloud LLM API.
33
+ - Llama Champion: MiniCPM5 GGUF is loaded through llama.cpp when available.
34
+ - Sharing is Caring: the planner trace is included as `agent_trace.json`.
35
+
36
  ## What the model does
37
 
38
  MiniCPM5 receives dispatcher notes such as:
 
63
  The demo data is synthetic. The app stores nothing, uses no cloud LLM API, and
64
  does not require user secrets. Uploaded CSVs are processed only during the
65
  Gradio session.
 
README.md CHANGED
@@ -5,6 +5,7 @@ colorFrom: green
5
  colorTo: yellow
6
  sdk: gradio
7
  sdk_version: 6.14.0
 
8
  app_file: app.py
9
  pinned: false
10
  license: mit
@@ -17,6 +18,10 @@ tags:
17
  - openbmb
18
  - operations-research
19
  - logistics
 
 
 
 
20
  ---
21
 
22
  # Tiny Dispatch Coach
@@ -41,16 +46,12 @@ Spaces, and models under 32B parameters.
41
  - Model repo: `openbmb/MiniCPM5-1B-GGUF`
42
  - File: `MiniCPM5-1B-Q4_K_M.gguf`
43
  - Parameter count: `1.08B`
44
- - Runtime target: local GGUF through `llama-cpp-python` when the Space runtime
45
- has a prebuilt llama.cpp wheel or enough memory for the dependency
46
  - Cloud LLM APIs: none
47
 
48
- The public CPU Basic Space keeps the app responsive by treating the MiniCPM5
49
- runtime as optional. If `llama-cpp-python` is unavailable during a cold start,
50
- the app falls back to a deterministic parser and makes that visible in the
51
- parser trace. On a larger Space or local machine with `llama-cpp-python`
52
- installed, the same code path downloads `openbmb/MiniCPM5-1B-GGUF` and uses
53
- MiniCPM5 for note parsing.
54
 
55
  The route optimizer never depends on hidden model output: every route, time
56
  window, lateness minute, and baseline delta is computed deterministically.
@@ -59,7 +60,7 @@ window, lateness minute, and baseline delta is computed deterministically.
59
 
60
  Included now:
61
 
62
- - MiniCPM5-ready text constraint parsing with deterministic CPU fallback.
63
  - Capacity-safe multi-trip route planning.
64
  - Manual baseline comparison.
65
  - Synthetic sample data only.
 
5
  colorTo: yellow
6
  sdk: gradio
7
  sdk_version: 6.14.0
8
+ python_version: 3.12
9
  app_file: app.py
10
  pinned: false
11
  license: mit
 
18
  - openbmb
19
  - operations-research
20
  - logistics
21
+ models:
22
+ - openbmb/MiniCPM5-1B-GGUF
23
+ preload_from_hub:
24
+ - openbmb/MiniCPM5-1B-GGUF MiniCPM5-1B-Q4_K_M.gguf
25
  ---
26
 
27
  # Tiny Dispatch Coach
 
46
  - Model repo: `openbmb/MiniCPM5-1B-GGUF`
47
  - File: `MiniCPM5-1B-Q4_K_M.gguf`
48
  - Parameter count: `1.08B`
49
+ - Runtime target: local GGUF through `llama-cpp-python`
 
50
  - Cloud LLM APIs: none
51
 
52
+ The Space preloads the Q4 MiniCPM5 GGUF file and installs the CPU llama.cpp
53
+ wheel. If a runtime cold start still cannot load the model, the app falls back
54
+ to a deterministic parser and makes that visible in the parser trace.
 
 
 
55
 
56
  The route optimizer never depends on hidden model output: every route, time
57
  window, lateness minute, and baseline delta is computed deterministically.
 
60
 
61
  Included now:
62
 
63
+ - MiniCPM5 text constraint parsing with deterministic CPU fallback.
64
  - Capacity-safe multi-trip route planning.
65
  - Manual baseline comparison.
66
  - Synthetic sample data only.
SUBMISSION.md ADDED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Build Small Submission Plan
2
+
3
+ ## Project
4
+
5
+ - Space: https://huggingface.co/spaces/build-small-hackathon/tiny-dispatch-coach
6
+ - Runtime: https://build-small-hackathon-tiny-dispatch-coach.hf.space/
7
+ - Track: Backyard AI
8
+ - Model: `openbmb/MiniCPM5-1B-GGUF`
9
+ - File: `MiniCPM5-1B-Q4_K_M.gguf`
10
+ - Parameters: 1.08B
11
+ - Runtime path: local GGUF through `llama-cpp-python`
12
+
13
+ ## Why It Fits Build Small
14
+
15
+ Tiny Dispatch Coach solves a narrow operational problem: turn a small delivery
16
+ sheet and messy dispatcher notes into an auditable route plan. The model does
17
+ not invent routes. MiniCPM5 parses human instructions into a compact constraint
18
+ schema, then deterministic code computes time windows, capacity, route splits,
19
+ late minutes, waiting time, and baseline deltas.
20
+
21
+ This makes the small model useful because the task is bounded:
22
+
23
+ - Extract route constraints from natural language notes.
24
+ - Keep all route math deterministic and inspectable.
25
+ - Run without cloud LLM APIs.
26
+ - Use only synthetic demo data.
27
+
28
+ ## Bonus Quest Alignment
29
+
30
+ - OpenBMB Awards: uses `openbmb/MiniCPM5-1B-GGUF`.
31
+ - Off the Grid: no cloud LLM API or external inference service.
32
+ - Llama Champion: MiniCPM5 runs through `llama-cpp-python` when available.
33
+ - Field Notes: see `FIELD_NOTES.md`.
34
+ - Sharing is Caring: see `agent_trace.json`.
35
+
36
+ ## Demo Video Script
37
+
38
+ 1. Open the Space and point to the OpenBMB MiniCPM5 badges.
39
+ 2. Leave the CSV empty so the synthetic sample is used.
40
+ 3. Read the default dispatcher note: start time, urgent school/clinic stops,
41
+ fresh produce before lunch, van capacity 18.
42
+ 4. Click **Plan route**.
43
+ 5. Show the parser trace: MiniCPM5 path or explicit deterministic fallback.
44
+ 6. Show the Dispatch Score:
45
+ - Manual late minutes: 207.
46
+ - Tiny Dispatch Coach late minutes: 0.
47
+ - On-time rate: 100%.
48
+ - Capacity split: 3 trips.
49
+ 7. Show the driver cards and route map.
50
+ 8. Close with the privacy stance: synthetic data, no API keys, no customer data,
51
+ no cloud LLM API.
52
+
53
+ ## Social Post Draft
54
+
55
+ I built Tiny Dispatch Coach for the Build Small Hackathon:
56
+
57
+ Small delivery teams often have messy notes, tight windows, and a van capacity
58
+ constraint. This Gradio Space uses OpenBMB MiniCPM5-1B-GGUF to parse dispatch
59
+ notes into route constraints, then a deterministic planner creates auditable
60
+ driver routes.
61
+
62
+ No cloud LLM API. Synthetic demo data only. 1.08B params.
63
+
64
+ Space: https://huggingface.co/spaces/build-small-hackathon/tiny-dispatch-coach
65
+
66
+ #BuildSmallHackathon #HuggingFace #Gradio #OpenBMB #MiniCPM
67
+
68
+ ## Final Submission Checklist
69
+
70
+ - [x] Public Hugging Face Space.
71
+ - [x] Gradio app.
72
+ - [x] Model under 32B parameters.
73
+ - [x] OpenBMB model listed in README metadata.
74
+ - [x] Synthetic sample data only.
75
+ - [x] No secrets or real customer records.
76
+ - [x] Field notes included.
77
+ - [x] Agent trace included.
78
+ - [ ] Record short demo video.
79
+ - [ ] Publish social post.
80
+ - [ ] Submit Space link, video link, and social post link before the deadline.
app.py CHANGED
@@ -742,6 +742,12 @@ with gr.Blocks(
742
  `order_id`, `customer`, `lat`, `lng`, `demand`, `service_min`, `ready_time`, `due_time`, `priority`, `notes`, optional `manual_sequence`.
743
 
744
  Leave the file empty to run the included sample route.
 
 
 
 
 
 
745
  """
746
  )
747
 
 
742
  `order_id`, `customer`, `lat`, `lng`, `demand`, `service_min`, `ready_time`, `due_time`, `priority`, `notes`, optional `manual_sequence`.
743
 
744
  Leave the file empty to run the included sample route.
745
+ """
746
+ )
747
+ gr.Markdown(
748
+ """
749
+ ### Build Small fit
750
+ OpenBMB MiniCPM5, 1.08B parameters, local GGUF path, no cloud LLM API, synthetic sample data, explicit parser trace.
751
  """
752
  )
753
 
requirements.txt CHANGED
@@ -1,3 +1,5 @@
1
  gradio>=6.14.0
2
  pandas>=2.2.0
3
  huggingface_hub>=0.34.0
 
 
 
1
  gradio>=6.14.0
2
  pandas>=2.2.0
3
  huggingface_hub>=0.34.0
4
+ --extra-index-url https://abetlen.github.io/llama-cpp-python/whl/cpu
5
+ llama-cpp-python==0.3.28