2796gauravc's picture
Upload README.md with huggingface_hub
1a1cca7 verified
metadata
language:
  - en
  - hi
license: gemma
tags:
  - function-calling
  - gemma
  - kosha
  - android
  - on-device
  - litert
  - mediapipe
  - finance
base_model: 2796gauravc/kosha-functiongemma-phase0

KOSHA Phase 0 — Android .task File

KOSHA (कोश) — Private on-device Indian finance tracker.
This is the MediaPipe-ready .task file for Android LiteRT deployment.

The fine-tuned merged model is at 2796gauravc/kosha-functiongemma-phase0.

File Info

Property Value
Base model FunctionGemma 270M
Quantization dynamic_int8
KV cache max len 1024
Size ~290 MB
Format MediaPipe .task (LiteRT)

Functions

  • log_expense — Indian bills, UPI, groceries, fuel, dining
  • log_income — Salary, freelance, UPI received
  • no_expense — OTP, promotions, non-financial messages

Android Integration

// build.gradle.kts
implementation("com.google.mediapipe:tasks-genai:0.10.22")

// Usage
val options = LlmInference.LlmInferenceOptions.builder()
    .setModelPath("/data/local/tmp/kosha_phase0_q8_ekv1024.task")
    .setMaxTokens(1024)
    .setTopK(64)
    .setTopP(0.95f)
    .setTemperature(0.1f)   // Low temp for deterministic function calls
    .setPreferredBackend(LlmInference.Backend.CPU)  // CPU recommended for Gemma 270M
    .build()
val llm = LlmInference.createFromOptions(context, options)

val result = llm.generateResponse(yourFunctionGemmaPrompt)
// Parse: <start_function_call>call:log_expense{...}<end_function_call>