DeepMount00 / mamba_790_hf_qa

huggingface.co
Total runs: 25
24-hour runs: 1
7-day runs: -1
30-day runs: 9
Model's Last Updated: April 08 2024
question-answering

Introduction of mamba_790_hf_qa

Model Details of mamba_790_hf_qa

SQuAD-it Evaluation

The Stanford Question Answering Dataset (SQuAD) in Italian (SQuAD-it) is used to evaluate the model's reading comprehension and question-answering capabilities. The following table presents the F1 score and Exact Match (EM) metrics:

Model F1 Score Exact Match (EM)
DeepMount00/Gemma_QA_ITA_v3 77.24% 64.60%
DeepMount00/Gemma_QA_ITA_v2 77.17% 63.82%
DeepMount00/mamba_790_hf_qa 75.89% 66.71%
DeepMount00/Gemma_QA_ITA 59.59% 40.68%
How to Use

How to use mamba q&a

from transformers import MambaConfig, MambaForCausalLM, AutoTokenizer
import torch

model_name = "DeepMount00/mamba_790_hf_qa"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = MambaForCausalLM.from_pretrained(model_name, device_map={"": 0}).eval()


def predict(contesto, domanda):
    device = "cuda:0"
    prefix_text = 'Di seguito ti verrà fornito un contesto e poi una domanda. il tuo compito è quello di rispondere alla domanda basandoti esclusivamente sul contesto\n\n'

    prompt = f"""{prefix_text}##CONTESTO: {contesto}\n##DOMANDA: {domanda}\n"""

    input_ids = tokenizer([prompt], return_tensors="pt").to(device)

    generate_ids = model.generate(**input_ids, max_new_tokens=150, eos_token_id=8112)

    answer = tokenizer.batch_decode(generate_ids)
    try:
        final_answer = answer[0].split("##RISPOSTA: ")[1].split("##END")[0].strip("\n")
    except IndexError:
        final_answer = ""
    return final_answer


contesto = """La torre degli Asinelli è una delle cosiddette due torri di Bologna, simbolo della città, situate in piazza di porta Ravegnana, all'incrocio tra le antiche strade San Donato (ora via Zamboni), San Vitale, Maggiore e Castiglione. Eretta, secondo la tradizione, fra il 1109 e il 1119 dal nobile Gherardo Asinelli, la torre è alta 97,20 metri, pende verso ovest per 2,23 metri e presenta all'interno una scalinata composta da 498 gradini. Ancora non si può dire con certezza quando e da chi fu costruita la torre degli Asinelli. Si presume che la torre debba il proprio nome a Gherardo Asinelli, il nobile cavaliere di fazione ghibellina al quale se ne attribuisce la costruzione, iniziata secondo una consolidata tradizione l'11 ottobre 1109 e terminata dieci anni dopo, nel 1119."""
domanda = "Dove si trova precisamente la torre degli Asinelli?"

print(predict(contesto, domanda))

Runs of DeepMount00 mamba_790_hf_qa on huggingface.co

25
Total runs
1
24-hour runs
3
3-day runs
-1
7-day runs
9
30-day runs

More Information About mamba_790_hf_qa huggingface.co Model

More mamba_790_hf_qa license Visit here:

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

mamba_790_hf_qa huggingface.co

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

DeepMount00 mamba_790_hf_qa online free

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

DeepMount00 mamba_790_hf_qa online free url in huggingface.co:

https://huggingface.co/DeepMount00/mamba_790_hf_qa

mamba_790_hf_qa install

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

mamba_790_hf_qa install url in huggingface.co:

https://huggingface.co/DeepMount00/mamba_790_hf_qa

Url of mamba_790_hf_qa

mamba_790_hf_qa huggingface.co Url

Provider of mamba_790_hf_qa huggingface.co

DeepMount00
ORGANIZATIONS

Other API from DeepMount00

huggingface.co

Total runs: 1.4K
Run Growth: 1.0K
Growth Rate: 75.00%
Updated:April 25 2024