Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: google/gemma-3-270m-it
|
| 3 |
+
library_name: transformers.js
|
| 4 |
+
language:
|
| 5 |
+
- en
|
| 6 |
+
pipeline_tag: text-generation
|
| 7 |
+
tags:
|
| 8 |
+
- onnx
|
| 9 |
+
- gemma
|
| 10 |
+
- gemma-3
|
| 11 |
+
- emoji
|
| 12 |
+
- text-to-emoji
|
| 13 |
+
- conversational
|
| 14 |
+
- web-ready
|
| 15 |
+
license: gemma
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
# Model Card for myemoji-gemma-3-270m-it-onnx
|
| 20 |
+
|
| 21 |
+
This model is a fine-tuned version of [google/gemma-3-270m-it](https://huggingface.co/google/gemma-3-270m-it), exported to **ONNX** (Open Neural Network Exchange) format for optimized on-device performance.
|
| 22 |
+
It is designed to act as an "emoji translator," converting input text into relevant emojis.
|
| 23 |
+
|
| 24 |
+
## Model Details
|
| 25 |
+
|
| 26 |
+
* **Model Name:** myemoji-gemma-3-270m-it-onnx
|
| 27 |
+
|
| 28 |
+
* **Base Model:** google/gemma-3-270m-it
|
| 29 |
+
|
| 30 |
+
* **Architecture:** Gemma 3 (270M parameters)
|
| 31 |
+
|
| 32 |
+
* **Format:** ONNX (optimized for web/mobile inference)
|
| 33 |
+
|
| 34 |
+
* **Fine-tuning Task:** Text-to-Emoji translation
|
| 35 |
+
|
| 36 |
+
* **Language:** English (Input), Emojis (Output)
|
| 37 |
+
|
| 38 |
+
|
| 39 |
+
## Intended Use
|
| 40 |
+
|
| 41 |
+
This model is lightweight (270M parameters) and formatted in ONNX, making it ideal for running directly in the browser (using Transformers.js) or on mobile devices without requiring heavy server-side compute.
|
| 42 |
+
|
| 43 |
+
### Primary Use Case:
|
| 44 |
+
|
| 45 |
+
* Translating sentences into emojis (e.g., "I am happy" -> "π").
|
| 46 |
+
|
| 47 |
+
* Fun/creative text augmentation in web applications.
|
| 48 |
+
|
| 49 |
+
## How to Use (Transformers.js)
|
| 50 |
+
|
| 51 |
+
You can run this model in a web browser using [Transformers.js](https://www.google.com/search?q=https://huggingface.co/docs/transformers.js).
|
| 52 |
+
|
| 53 |
+
```javascript
|
| 54 |
+
import { pipeline } from '@xenova/transformers';
|
| 55 |
+
|
| 56 |
+
// Allocate the pipeline
|
| 57 |
+
const generator = await pipeline('text-generation', 'manuelaschrittwieser/myemoji-gemma-3-270m-it-onnx');
|
| 58 |
+
|
| 59 |
+
// Generate emojis
|
| 60 |
+
const output = await generator('I am so excited for the party!', {
|
| 61 |
+
max_new_tokens: 20,
|
| 62 |
+
});
|
| 63 |
+
|
| 64 |
+
console.log(output);
|
| 65 |
+
// Expected output: πππ
|
| 66 |
+
```
|
| 67 |
+
## Training Data
|
| 68 |
+
|
| 69 |
+
This model was fine-tuned using the Gemma 3 270M Instruction Tuned model as a base. It was likely trained on a dataset of text-emoji pairs to learn the mapping between
|
| 70 |
+
natural language sentiments/objects and their corresponding emoji representations.
|
| 71 |
+
|
| 72 |
+
## Hardware & Optimization
|
| 73 |
+
|
| 74 |
+
* **Parameter Count:** 270M (Ultra-compact)
|
| 75 |
+
|
| 76 |
+
* **Export Format:** ONNX
|
| 77 |
+
|
| 78 |
+
* **Hardware Compatibility:** CPU, WebGPU, NPU (via ONNX Runtime)
|
| 79 |
+
|
| 80 |
+
## License
|
| 81 |
+
|
| 82 |
+
This model is built upon Google's Gemma model. Users must comply with the [Gemma Terms of Use](https://ai.google.dev/gemma/terms).
|
| 83 |
+
|
| 84 |
+
* **License:** Gemma Terms of Use / Apache 2.0 (Check original base model for specifics)
|
| 85 |
+
|
| 86 |
+
|