EmojiLM

EmojiLM translates between English and emoji. Put brackets around the words you want to replace, or give it a sentence containing emoji to decode. It also has a rebus mode for emoji word puzzles.

The model is a decoder-only Transformer trained from scratch with 11,233,920 parameters and a 256-token context. The CLI combines curated rules, stored readings, and the model. For a marked word with several stored replacements, the model can rank them using the sentence. Bundled decode uses stored readings for individual emoji and known combinations.

Quick start

Get the Python runtime from the EmojiLM source repository on GitHub.

Use Python 3.10 or later. From the source checkout, create a virtual environment and install the requirements. Download model.pt into ckpt/final/ in that checkout. The CLI finds it there by default, or you can point to it with --ckpt.

python3 -m venv .venv
.venv/bin/python -m pip install -r requirements.txt

.venv/bin/python -m emojilm.generate --engine model-edit --mode encode --text 'I baked an [apple] [pie].'
# I baked an 🍎 πŸ₯§.

.venv/bin/python -m emojilm.generate --mode encode --text 'I usually [train] before I catch the [train].'
# I usually [train] before I catch the πŸš†.

.venv/bin/python -m emojilm.generate --engine model-edit --mode decode --text 'I baked 🍎πŸ₯§ yesterday.'
# I baked apple pie yesterday.

.venv/bin/python -m emojilm.generate --mode rebus --text 'πŸπŸƒ'
# believe (bee + leaf sounds similar to believe)

model.pt is a custom PyTorch checkpoint loaded by EmojiLM. It contains the weights, model configuration, tokenizer, and bundled readings. tokenizer.json is a separate export of the same tokenizer for inspection. The CLI reads the embedded copy. Use the EmojiLM Python runtime to load these files.

Training data

This checkpoint was trained for 12,000 steps with a batch size of 32 and a peak learning rate of 4e-4. Its training mixture includes curated emoji and rebus examples and 84 bracket edits that teach different senses of mouse, bat, and seal. Separate sentences were used for checkpoint selection and testing. The mixture also draws from the following sources.

  • English Unicode CLDR names and keywords for individual emoji. CLDR annotations
  • English sentences paired with emoji summaries. Text2Emoji
  • Story passages turned into examples with emoji substitutions in context. TinyStories

After training the Transformer, we fitted word-sense classifiers on its frozen representations using the 84 ambiguity edits and 84 additional contrast sentences. Only the classifiers for mouse and bat improved development accuracy. The checkpoint includes those two classifiers, with 1,605 coefficients in total.

We then trained a shared classifier for book, watch, and train on 36 noun/verb pairs and evaluated it on nine development pairs. It uses nearby words to decide whether to encode the marked word as a noun or keep it as a verb. This feature requires a version of the EmojiLM runtime that reads noun_verb_gate from the checkpoint.

The EmojiLM source code is distributed under the MIT License. Each training dataset has its own terms.

Evaluation

The edit benchmarks measure exact matches from the bundled model-edit engine, including its use of stored readings. A noun/verb pair counts only when both sentences match. The last row uses direct neural generation on a separate compact holdout covering encode, decode, and rebus tasks.

Test set V1 baseline Ambiguity checkpoint With sense classifiers With noun/verb classifier (current)
Long sentences with marked words or emoji 120/120 119/120 119/120 118/120
Original edit prompts 91/110 91/110 91/110 91/110
Ambiguous words, original holdout 12/28 16/28 19/28 19/28
Ambiguous words, additional 21 sentences β€” 10/21 11/21 11/21
Held-out noun/verb pairs β€” β€” 0/18 15/18
Compact holdout, direct neural generation 40/120 46/120 46/120 46/120

The current checkpoint kept all 18 held-out verbs and encoded 15 of the 18 nouns. It left two uses of [book] and one of [watch] in brackets. The long-sentence score dropped by one because the reference uses ⌚ for β€œwatch the sun shine,” where the classifier kept the verb.

Limits

Emoji meanings depend on context and convention. EmojiLM can pick the wrong sense of a word such as mouse, leave unfamiliar spans untouched, or return a literal reading that sounds awkward in a sentence. The evaluation covers a small set of English examples. Review the output when the intended meaning matters.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Datasets used to train Grizzlykw/emojilm