CoolFace
Modelpublic

cpxavier2/codegemma-7b-it-int4-litertlm

sourceHugging Facegemmaupdated 1mo agoView on Hugging Face
0likes
Model Card

CodeGemma 7B IT (INT4 LiteRT LM Model for Android)

This repository contains Google's CodeGemma 7B Instruction-Tuned (`google/codegemma-7b-it`) quantized to INT4 and packaged into the `.litertlm` format for on-device execution on Android using Google's LiteRT runtime.

Model Details

  • —Base Model: google/codegemma-7b-it
  • —Format: .litertlm (LiteRT LM Model Bundle)
  • —Quantization: INT4 (dynamic_wi4_afp32)
  • —Target Runtime: Android LiteRT C++/Kotlin SDK

Usage on Android

Download the .litertlm bundle into your Android app's assets or internal storage and load it via LiteRT-LM:

kotlin
val modelPath = File(context.filesDir, "codegemma-7b-it-int4.litertlm").absolutePath
val options = ModelOptions.builder()
    .setModelPath(modelPath)
    .build()

val engine = LiteRtLmEngine.create(options)
val response = engine.generate("Write a Kotlin function to check prime numbers.")
println(response)