Instructions to use cpxavier2/codegemma-7b-it-int4-litertlm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LiteRT
How to use cpxavier2/codegemma-7b-it-int4-litertlm with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
File size: 1,174 Bytes
0321716 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | ---
license: gemma
base_model: google/codegemma-7b-it
library_name: litert
tags:
- litert
- litertlm
- codegemma
- int4
- android
- on-device
pipeline_tag: text-generation
---
# 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](https://huggingface.co/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)
```
|