CgrHello commited on
Commit
e3dd095
·
verified ·
1 Parent(s): 680ef70

Add files using upload-large-folder tool

Browse files
Files changed (4) hide show
  1. .gitattributes +1 -0
  2. README.md +47 -0
  3. gemma-1.1-2b-it-gpu-int4.bin +3 -0
  4. tokenizer.spm +3 -0
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.spm filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Gemma AI Models
2
+
3
+ This directory contains the downloaded Gemma 3N (2B parameters) model files required for the M.AI application's on-device AI features.
4
+
5
+ ## Included Files
6
+
7
+ 1. **`gemma-1.1-2b-it-gpu-int4.bin`** (~1.35 GB)
8
+ * **Description:** The main Large Language Model, instruction-tuned and quantized (INT4) for efficient GPU inference on mobile devices.
9
+ * **Source:** Google's Gemma 1.1 2B IT TFLite repository (Hugging Face).
10
+ * **SHA-256:** `53f7defdb5554dd517a6863d2d605a144d14361d6c486bbeaac2870497b75747`
11
+
12
+ 2. **`tokenizer.spm`** (~4.2 MB)
13
+ * **Description:** The SentencePiece tokenizer model used to process text input before sending it to the LLM.
14
+ * **Source:** Google's Gemma 2B repository (Hugging Face).
15
+ * **SHA-256:** `61a7b147390c64585d6c3543dd6fc636906c9af3865a5548f27f31aee1d4c8e2`
16
+
17
+ ## 🚀 Next Steps: Hosting & Configuration
18
+
19
+ Since these models are gated by Google, you **cannot** use direct Hugging Face links in your production app. You must self-host them.
20
+
21
+ ### 1. Upload to Hosting Service
22
+ Upload both files to a public file host. Recommended options:
23
+ * **GitHub Releases:** Create a release in your repo (e.g., `v1.0-models`) and attach these files. (Free, fast, public).
24
+ * **Firebase Storage:** Upload to your project's storage bucket.
25
+ * **AWS S3 / Cloudflare R2:** Standard object storage.
26
+
27
+ ### 2. Get Public URLs
28
+ Obtain the direct download link for each file.
29
+ * *Test:* Running `curl -I <LINK>` should return `200 OK` and the correct file size (not a login page).
30
+
31
+ ### 3. Update App Configuration
32
+ Open `apps/ai_apps/maiv2/lib/core/config/environment_config.dart` and update the `production` configuration:
33
+
34
+ ```dart
35
+ static const EnvironmentConfig production = EnvironmentConfig(
36
+ // ... other config ...
37
+ gemmaModelUrl: 'https://your-host.com/path/to/gemma-1.1-2b-it-gpu-int4.bin',
38
+ gemmaTokenizerUrl: 'https://your-host.com/path/to/tokenizer.spm',
39
+
40
+ // Use the SHA-256 checksums listed above
41
+ gemmaModelChecksum: '53f7defdb5554dd517a6863d2d605a144d14361d6c486bbeaac2870497b75747',
42
+ gemmaTokenizerChecksum: '61a7b147390c64585d6c3543dd6fc636906c9af3865a5548f27f31aee1d4c8e2',
43
+ );
44
+ ```
45
+
46
+ ### 4. Verify
47
+ Run the app in release mode. The "Download AI Model" button in the chat interface will now fetch these specific files and verify their integrity using the checksums.
gemma-1.1-2b-it-gpu-int4.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:53f7defdb5554dd517a6863d2d605a144d14361d6c486bbeaac2870497b75747
3
+ size 1346502656
tokenizer.spm ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:61a7b147390c64585d6c3543dd6fc636906c9af3865a5548f27f31aee1d4c8e2
3
+ size 4241003