Text Generation
Transformers
Safetensors
English
Italian
gpt2
decoder-only
causal-lm
distillation
dpo
sft
lora
Eval Results (legacy)
text-generation-inference
Instructions to use francescofiamingo1/FF_3.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use francescofiamingo1/FF_3.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="francescofiamingo1/FF_3.1")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("francescofiamingo1/FF_3.1") model = AutoModelForCausalLM.from_pretrained("francescofiamingo1/FF_3.1") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use francescofiamingo1/FF_3.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "francescofiamingo1/FF_3.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "francescofiamingo1/FF_3.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/francescofiamingo1/FF_3.1
- SGLang
How to use francescofiamingo1/FF_3.1 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "francescofiamingo1/FF_3.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "francescofiamingo1/FF_3.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use 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 "francescofiamingo1/FF_3.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "francescofiamingo1/FF_3.1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use francescofiamingo1/FF_3.1 with Docker Model Runner:
docker model run hf.co/francescofiamingo1/FF_3.1
FF_3.1
FF_3.1 is a 2.02B parameter GPT-2 decoder-only language model trained from scratch with a multi-stage pipeline combining supervised fine-tuning, preference optimization, knowledge distillation, and instruction tuning.
Model Details
| Architecture | GPT-2 decoder-only |
| Parameters | 2.02B |
| Hidden size (d) | 2048 |
| Attention heads (h) | 16 |
| FFN size (ff) | 8192 |
| Layers (L) | 38 |
| Context length | 2048 |
| Tokenizer | GPT-2 BPE (vocab size: 50,257) |
| Precision | bfloat16 |
Training Pipeline
FF_3.1 was trained through a 5-stage pipeline:
- Pretraining โ 90B tokens on a large English corpus
- SFT โ 760K + 100K examples (OpenHermes-2.5 / NuminaMath / Eurus)
- DPO โ 38,863 preference pairs
- Distillation v3 โ 47K examples targeting MMLU + GSM8K + ARC benchmarks
- LoRA v4b โ 10K examples for instruction following refinement
Evaluation
| Benchmark | Score |
|---|---|
| MMLU (5-shot) | 27.94% (+3.94 pp vs FF_3 baseline of 24%) |
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("francescofiamingo1/FF_3.1", torch_dtype="bfloat16")
tokenizer = AutoTokenizer.from_pretrained("francescofiamingo1/FF_3.1")
input_text = "Explain photosynthesis in simple terms."
inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.7, do_sample=True)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Known Limitations
- Math reasoning is still weak โ the model struggles with multi-step arithmetic and word problems
- Instruction count following is imprecise โ the model may not reliably follow constraints like "list exactly 5 items"
What's Next
FF_3.2 will focus on:
- DPO with UltraFeedback dataset for improved preference alignment
- Improved math dataset for stronger quantitative reasoning
License
Apache 2.0
- Downloads last month
- 3
Evaluation results
- 5-shot accuracy on MMLUself-reported27.940