Text Generation
Transformers
Safetensors
English
gemma
text-generation-inference
unsloth
trl
conversational
4-bit precision
bitsandbytes
How to use from
SGLangUse Docker images
docker run --gpus all \
--shm-size 32g \
-p 30000:30000 \
-v ~/.cache/huggingface:/root/.cache/huggingface \
--env "HF_TOKEN=<secret>" \
--ipc=host \
lmsysorg/sglang:latest \
python3 -m sglang.launch_server \
--model-path "FinancialSupport/hellfire-2b" \
--host 0.0.0.0 \
--port 30000# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "FinancialSupport/hellfire-2b",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'Quick Links
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) |
|---|---|---|
| FinancialSupport/hellfire-2b | 44.06% | 26.27% |
How to Use
How to use hellfire-2b
import os
from unsloth import FastLanguageModel
import torch
os.environ['TOKENIZERS_PARALLELISM'] = 'TRUE'
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "FinancialSupport/hellfire-2b",
max_seq_length = 10000,
dtype = torch.bfloat16,
load_in_4bit = True,
)
FastLanguageModel.for_inference(model) # Enable native 2x faster inference
alpaca_prompt = """
Di seguito ti verrà fornito un contesto e poi una domanda. il tuo compito è quello di rispondere alla domanda basandoti esclusivamente sul contesto
### Contesto:
{}
### Domanda:
{}
### Risposta:
{}
"""
inputs = tokenizer(
[
alpaca_prompt.format(
"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.", # instruction
"Quale è alta la torre degli Asinelli?", # input
"", # output - leave this blank for generation!
)
], return_tensors = "pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens = 64, use_cache = False)
print(tokenizer.batch_decode(outputs))
Uploaded model
- Developed by: FinancialSupport
- License: apache-2.0
- Finetuned from model : unsloth/gemma-2b-it-bnb-4bit
This gemma model was trained 2x faster with Unsloth and Huggingface's TRL library.
- Downloads last month
- 1,084
Model tree for FinancialSupport/hellfire-2b
Base model
unsloth/gemma-2b-it-bnb-4bit
Install from pip and serve model
# Install SGLang from pip: pip install sglang# Start the SGLang server: python3 -m sglang.launch_server \ --model-path "FinancialSupport/hellfire-2b" \ --host 0.0.0.0 \ --port 30000# Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "FinancialSupport/hellfire-2b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'