gsarti / gemma-2-2b-rebus-solver-fp16

huggingface.co
Total runs: 23
24-hour runs: 0
7-day runs: 2
30-day runs: 12
Model's Last Updated: August 05 2024
text-generation

Introduction of gemma-2-2b-rebus-solver-fp16

Model Details of gemma-2-2b-rebus-solver-fp16

Gemma-2 2B Verbalized Rebus Solver 🇮🇹

This model is a parameter-efficient fine-tuned version of Gemma-2 2B trained for verbalized rebus solving in Italian, as part of the release for our paper Non Verbis, Sed Rebus: Large Language Models are Weak Solvers of Italian Rebuses . The task of verbalized rebus solving consists of converting an encrypted sequence of letters and crossword definitions into a solution phrase matching the word lengths specified in the solution key. An example is provided below.

The model was trained in 4-bit precision for 5070 steps on the verbalized subset of the EurekaRebus using QLora via Unsloth and TRL . This version has merged adapter weights in half precision, enabling out-of-the-box for usage with the transformers library.

We also provide adapter checkpoints through training and 8-bit GGUF versions of this model for analysis and local execution.

Using the Model

The following example shows how to perform inference using Unsloth:

# With Unsloth (efficient, requires GPU)
from unsloth import FastLanguageModel

model, tokenizer = FastLanguageModel.from_pretrained(
    model_name = "gsarti/gemma-2-2b-rebus-solver-fp16",
    max_seq_length = 1248,
    load_in_4bit = True,
)

# Inference
verbalized_rebus = "[Materiale espulso dai vulcani] R O [Strumento del calzolaio] [Si trovano ai lati del bacino] C I [Si ingrassano con la polenta] E I N [Contiene scorte di cibi] B [Isola in francese]"
solution_key = "1 ' 5 6 5 3 3 1 14"
template = """<bos><start_of_turn>user
Risolvi gli indizi tra parentesi per ottenere una prima lettura, e usa la chiave di lettura per ottenere la soluzione del rebus.

Rebus: {rebus}
Chiave risolutiva: {key}<end_of_turn>
<start_of_turn>model"""
input = template.format(rebus=verbalized_rebus, key=solution_key)
inputs = tokenizer(input, return_tensors="pt")["input_ids"]
outputs = model.generate(input_ids = inputs, max_new_tokens = 500, use_cache = True)
model_generations = tokenizer.batch_decode(outputs)
print(model_generations[0])

# Procediamo alla risoluzione del rebus passo per passo:
# - [Materiale espulso dai vulcani] = lava
# - R O = R O
# - [Strumento del calzolaio] = lesina
# - [Si trovano ai lati del bacino] = anche
# - C I = C I
# - [Si ingrassano con la polenta] = oche
# - E I N = E I N
# - [Contiene scorte di cibi] = dispensa
# - B = B
# - [Isola in francese] = ile
# 
# Prima lettura: lava R O lesina anche C I oche E I N silos B ile
# 
# Ora componiamo la soluzione seguendo la chiave risolutiva:
# 1 = L
# ' = '
# 5 = avaro
# 6 = lesina
# 5 = anche
# 3 = ciò
# 3 = che
# 1 = è
# 14 = indispensabile
# 
# Soluzione: L'avaro lesina anche ciò che è indispensabile

See the official code release for more examples.

Local usage with Ollama

A ready-to-use local version of this model is hosted on the Ollama Hub and can be used as follows:

ollama run gsarti/gemma2-2b-rebus-solver "Rebus: [Materiale espulso dai vulcani] R O [Strumento del calzolaio] [Si trovano ai lati del bacino] C I [Si ingrassano con la polenta] E I N [Contiene scorte di cibi] B [Isola in francese]\nChiave risolutiva: 1 ' 5 6 5 3 3 1 14"
Limitations

Lexical overfitting : As remarked in the related publication, the model overfitted the set of definitions/answers for first pass words. As a result, words that were explicitly witheld from the training set cause significant performance degradation when used as solutions for verbalized rebuses' definitions. You can compare model performances between in-domain and out-of-domain test examples to verify this limitation.

Model curators

For problems or updates on this model, please contact [email protected] .

Citation Information

If you use this model in your work, please cite our paper as follows:

@article{sarti-etal-2024-rebus,
    title = "Non Verbis, Sed Rebus: Large Language Models are Weak Solvers of Italian Rebuses",
    author = "Sarti, Gabriele and Caselli, Tommaso and Nissim, Malvina and Bisazza, Arianna",
    journal = "ArXiv",
    month = jul,
    year = "2024",
    volume = {abs/2408.00584},
    url = {https://arxiv.org/abs/2408.00584},
}
Acknowledgements

We are grateful to the Associazione Culturale "Biblioteca Enigmistica Italiana - G. Panini" for making its rebus collection freely accessible on the Eureka5 platform .

Runs of gsarti gemma-2-2b-rebus-solver-fp16 on huggingface.co

23
Total runs
0
24-hour runs
0
3-day runs
2
7-day runs
12
30-day runs

More Information About gemma-2-2b-rebus-solver-fp16 huggingface.co Model

More gemma-2-2b-rebus-solver-fp16 license Visit here:

https://choosealicense.com/licenses/apache-2.0

gemma-2-2b-rebus-solver-fp16 huggingface.co

gemma-2-2b-rebus-solver-fp16 huggingface.co is an AI model on huggingface.co that provides gemma-2-2b-rebus-solver-fp16's model effect (), which can be used instantly with this gsarti gemma-2-2b-rebus-solver-fp16 model. huggingface.co supports a free trial of the gemma-2-2b-rebus-solver-fp16 model, and also provides paid use of the gemma-2-2b-rebus-solver-fp16. Support call gemma-2-2b-rebus-solver-fp16 model through api, including Node.js, Python, http.

gemma-2-2b-rebus-solver-fp16 huggingface.co Url

https://huggingface.co/gsarti/gemma-2-2b-rebus-solver-fp16

gsarti gemma-2-2b-rebus-solver-fp16 online free

gemma-2-2b-rebus-solver-fp16 huggingface.co is an online trial and call api platform, which integrates gemma-2-2b-rebus-solver-fp16's modeling effects, including api services, and provides a free online trial of gemma-2-2b-rebus-solver-fp16, you can try gemma-2-2b-rebus-solver-fp16 online for free by clicking the link below.

gsarti gemma-2-2b-rebus-solver-fp16 online free url in huggingface.co:

https://huggingface.co/gsarti/gemma-2-2b-rebus-solver-fp16

gemma-2-2b-rebus-solver-fp16 install

gemma-2-2b-rebus-solver-fp16 is an open source model from GitHub that offers a free installation service, and any user can find gemma-2-2b-rebus-solver-fp16 on GitHub to install. At the same time, huggingface.co provides the effect of gemma-2-2b-rebus-solver-fp16 install, users can directly use gemma-2-2b-rebus-solver-fp16 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

gemma-2-2b-rebus-solver-fp16 install url in huggingface.co:

https://huggingface.co/gsarti/gemma-2-2b-rebus-solver-fp16

Url of gemma-2-2b-rebus-solver-fp16

gemma-2-2b-rebus-solver-fp16 huggingface.co Url

Provider of gemma-2-2b-rebus-solver-fp16 huggingface.co

gsarti
ORGANIZATIONS

Other API from gsarti

huggingface.co

Total runs: 552
Run Growth: -621
Growth Rate: -112.50%
Updated:May 20 2021
huggingface.co

Total runs: 147
Run Growth: 65
Growth Rate: 44.22%
Updated:June 17 2024
huggingface.co

Total runs: 89
Run Growth: 6
Growth Rate: 6.74%
Updated:June 17 2024
huggingface.co

Total runs: 50
Run Growth: -121
Growth Rate: -242.00%
Updated:May 20 2021
huggingface.co

Total runs: 34
Run Growth: -34
Growth Rate: -100.00%
Updated:June 17 2024
huggingface.co

Total runs: 21
Run Growth: 5
Growth Rate: 23.81%
Updated:January 24 2024
huggingface.co

Total runs: 9
Run Growth: -3
Growth Rate: -33.33%
Updated:September 27 2021
huggingface.co

Total runs: 4
Run Growth: -1
Growth Rate: -25.00%
Updated:October 05 2021