Instructions to use ferrazzipietro/meshTask-gemma-3-4b-it with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ferrazzipietro/meshTask-gemma-3-4b-it with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("google/gemma-3-4b-it") model = PeftModel.from_pretrained(base_model, "ferrazzipietro/meshTask-gemma-3-4b-it") - Transformers
How to use ferrazzipietro/meshTask-gemma-3-4b-it with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ferrazzipietro/meshTask-gemma-3-4b-it") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ferrazzipietro/meshTask-gemma-3-4b-it", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use ferrazzipietro/meshTask-gemma-3-4b-it with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ferrazzipietro/meshTask-gemma-3-4b-it" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ferrazzipietro/meshTask-gemma-3-4b-it", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ferrazzipietro/meshTask-gemma-3-4b-it
- SGLang
How to use ferrazzipietro/meshTask-gemma-3-4b-it 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 "ferrazzipietro/meshTask-gemma-3-4b-it" \ --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": "ferrazzipietro/meshTask-gemma-3-4b-it", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "ferrazzipietro/meshTask-gemma-3-4b-it" \ --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": "ferrazzipietro/meshTask-gemma-3-4b-it", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ferrazzipietro/meshTask-gemma-3-4b-it with Docker Model Runner:
docker model run hf.co/ferrazzipietro/meshTask-gemma-3-4b-it
meshTask-gemma-3-4b-it
This model is a fine-tuned version of google/gemma-3-4b-it on an unknown dataset. It achieves the following results on the evaluation set:
- Loss: 1.7279
- F1 Micro: 0.8986
- F1 Macro: 0.8924
- F1 Weighted: 0.8988
- Class/f1 Results Per Class: {}
- Items/f1 Scores Per Item: {'Aged': 0.8931129948340326, 'Pregnancy': 0.9141002949852507, 'Surveys and Questionnaires': 0.8941409172171575, 'Time Factors': 0.6048093504502778, 'Male': 0.7377071264987202, 'Mice': 0.9137555405303884, 'Cell Line, Tumor': 0.8859792482231765, 'Adolescent': 0.822261555764515, 'Signal Transduction': 0.8636551060613002, 'Risk Factors': 0.863497453310696, 'Prognosis': 0.8373102898977666, 'Disease Models, Animal': 0.8458666666666667, 'Animals': 0.9535515630753726, 'Treatment Outcome': 0.8726708877115907}
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.0003
- train_batch_size: 32
- eval_batch_size: 32
- seed: 42
- distributed_type: multi-GPU
- gradient_accumulation_steps: 4
- total_train_batch_size: 128
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-07 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: cosine
- lr_scheduler_warmup_ratio: 0.1
- num_epochs: 1
Training results
| Training Loss | Epoch | Step | Validation Loss | F1 Micro | F1 Macro | F1 Weighted | Class/f1 Results Per Class | Items/f1 Scores Per Item |
|---|---|---|---|---|---|---|---|---|
| 9.0062 | 0.0517 | 20 | 2.2966 | 0.0 | 0.0 | 0.0 | {} | {'Aged': 0.0, 'Pregnancy': 0.0, 'Surveys and Questionnaires': 0.0, 'Time Factors': 0.0, 'Male': 0.0, 'Mice': 0.0, 'Cell Line, Tumor': 0.0, 'Adolescent': 0.0, 'Signal Transduction': 0.0, 'Risk Factors': 0.0, 'Prognosis': 0.0, 'Disease Models, Animal': 0.0, 'Animals': 0.0, 'Treatment Outcome': 0.0} |
| 6.8734 | 0.1034 | 40 | 1.7996 | 0.7422 | 0.1240 | 0.7452 | {} | {'Aged': 0.19088100993822188, 'Pregnancy': 0.8576606509099147, 'Surveys and Questionnaires': 0.8891228070175439, 'Time Factors': 0.36978634117246073, 'Male': 0.22727272727272727, 'Mice': 0.41624485762684515, 'Cell Line, Tumor': 0.7806584182223582, 'Adolescent': 0.5536235221863964, 'Signal Transduction': 0.5123216601815823, 'Risk Factors': 0.3510815178241146, 'Prognosis': 0.5055848909004554, 'Disease Models, Animal': 0.472588838442497, 'Animals': 0.3220762277513745, 'Treatment Outcome': 0.32020747327193816} |
| 6.5938 | 0.1551 | 60 | 1.7653 | 0.8621 | 0.3424 | 0.8630 | {} | {'Aged': 0.6926461345065996, 'Pregnancy': 0.9747859818084537, 'Surveys and Questionnaires': 0.9008107332472377, 'Time Factors': 0.5490812379110251, 'Male': 0.303005132360886, 'Mice': 0.8797124980199589, 'Cell Line, Tumor': 0.8277627648983075, 'Adolescent': 0.3068512110726644, 'Signal Transduction': 0.7155364901281416, 'Risk Factors': 0.8223702806379971, 'Prognosis': 0.7640718562874251, 'Disease Models, Animal': 0.8109238241176012, 'Animals': 0.9441027948602569, 'Treatment Outcome': 0.8106838115648689} |
| 6.5594 | 0.2069 | 80 | 1.7526 | 0.8732 | 0.4347 | 0.8746 | {} | {'Aged': 0.79884645007702, 'Pregnancy': 0.9630065744284173, 'Surveys and Questionnaires': 0.8984134585539327, 'Time Factors': 0.6246711523307268, 'Male': 0.41900714461690064, 'Mice': 0.8750718832417854, 'Cell Line, Tumor': 0.8378806992250856, 'Adolescent': 0.8067494069859866, 'Signal Transduction': 0.8636949684243376, 'Risk Factors': 0.8410409846136057, 'Prognosis': 0.5480681260932891, 'Disease Models, Animal': 0.808000440871548, 'Animals': 0.9373972413619991, 'Treatment Outcome': 0.8108791903858318} |
| 6.5438 | 0.2586 | 100 | 1.7451 | 0.8850 | 0.4395 | 0.8853 | {} | {'Aged': 0.847216931669841, 'Pregnancy': 0.9735994397759103, 'Surveys and Questionnaires': 0.905724462069472, 'Time Factors': 0.5958204334365325, 'Male': 0.46990005878894764, 'Mice': 0.8907176948124359, 'Cell Line, Tumor': 0.8810304697418536, 'Adolescent': 0.823932021282091, 'Signal Transduction': 0.8412176059234884, 'Risk Factors': 0.8348097560975609, 'Prognosis': 0.5171641490433031, 'Disease Models, Animal': 0.7675925719010481, 'Animals': 0.9328933954784009, 'Treatment Outcome': 0.5485633882088082} |
| 6.5984 | 0.3103 | 120 | 1.7412 | 0.8857 | 0.5866 | 0.8859 | {} | {'Aged': 0.8490171189406155, 'Pregnancy': 0.9747859818084537, 'Surveys and Questionnaires': 0.9136612021857924, 'Time Factors': 0.6185819423040917, 'Male': 0.7068471511999954, 'Mice': 0.8864193131709055, 'Cell Line, Tumor': 0.8889423848499438, 'Adolescent': 0.8177004296407282, 'Signal Transduction': 0.7992483342655559, 'Risk Factors': 0.829885854827521, 'Prognosis': 0.5348941848197107, 'Disease Models, Animal': 0.7984708385112791, 'Animals': 0.9399640981317732, 'Treatment Outcome': 0.8328534210887152} |
| 6.4641 | 0.3620 | 140 | 1.7385 | 0.8837 | 0.4396 | 0.8846 | {} | {'Aged': 0.8527339591189234, 'Pregnancy': 0.9747859818084537, 'Surveys and Questionnaires': 0.9015523748486791, 'Time Factors': 0.40974126846091524, 'Male': 0.7433499754460632, 'Mice': 0.9041941664892484, 'Cell Line, Tumor': 0.8823313974781563, 'Adolescent': 0.8152924919391985, 'Signal Transduction': 0.8663017124126686, 'Risk Factors': 0.8462091132539232, 'Prognosis': 0.8281951772554834, 'Disease Models, Animal': 0.8092371682673367, 'Animals': 0.6230391172401482, 'Treatment Outcome': 0.5469808995686999} |
| 6.4688 | 0.4137 | 160 | 1.7343 | 0.8893 | 0.4408 | 0.8886 | {} | {'Aged': 0.8849566444847752, 'Pregnancy': 0.9594405594405595, 'Surveys and Questionnaires': 0.9129764265256665, 'Time Factors': 0.3709155268788296, 'Male': 0.753870831574504, 'Mice': 0.9111040872365224, 'Cell Line, Tumor': 0.8779541446208112, 'Adolescent': 0.7785425646551725, 'Signal Transduction': 0.8231857232333997, 'Risk Factors': 0.8491823137492429, 'Prognosis': 0.7947916666666667, 'Disease Models, Animal': 0.8194631011180227, 'Animals': 0.6253639978494449, 'Treatment Outcome': 0.5598871102582662} |
| 6.3859 | 0.4654 | 180 | 1.7329 | 0.8930 | 0.4439 | 0.8934 | {} | {'Aged': 0.8701140459978498, 'Pregnancy': 0.9471988795518207, 'Surveys and Questionnaires': 0.9169325860161471, 'Time Factors': 0.3989759590383615, 'Male': 0.7502864625961696, 'Mice': 0.9243712432774438, 'Cell Line, Tumor': 0.891382828441375, 'Adolescent': 0.8135506643702399, 'Signal Transduction': 0.8632369614512472, 'Risk Factors': 0.8542926054832998, 'Prognosis': 0.8281951772554834, 'Disease Models, Animal': 0.8158966188705965, 'Animals': 0.6230391172401482, 'Treatment Outcome': 0.8335075291294081} |
| 6.4031 | 0.5171 | 200 | 1.7304 | 0.8908 | 0.4431 | 0.8916 | {} | {'Aged': 0.8638779228666869, 'Pregnancy': 0.9747859818084537, 'Surveys and Questionnaires': 0.9169325860161471, 'Time Factors': 0.3958819302959617, 'Male': 0.7205352971888654, 'Mice': 0.9153532393473784, 'Cell Line, Tumor': 0.891382828441375, 'Adolescent': 0.8166369131510538, 'Signal Transduction': 0.8589409095158371, 'Risk Factors': 0.8542926054832998, 'Prognosis': 0.8367854183927093, 'Disease Models, Animal': 0.8102387655093317, 'Animals': 0.6215406960505, 'Treatment Outcome': 0.836922268907563} |
| 6.3891 | 0.5688 | 220 | 1.7287 | 0.8892 | 0.4427 | 0.8905 | {} | {'Aged': 0.8737156283736585, 'Pregnancy': 0.9747859818084537, 'Surveys and Questionnaires': 0.9175806729626506, 'Time Factors': 0.4061167098323803, 'Male': 0.478369384359401, 'Mice': 0.9153532393473784, 'Cell Line, Tumor': 0.8975685729363762, 'Adolescent': 0.5546830688564263, 'Signal Transduction': 0.8670832388487154, 'Risk Factors': 0.8410242809995285, 'Prognosis': 0.8318610506550591, 'Disease Models, Animal': 0.8217022993142395, 'Animals': 0.6162282188622957, 'Treatment Outcome': 0.5537809598115256} |
| 6.4516 | 0.6206 | 240 | 1.7277 | 0.8903 | 0.4425 | 0.8910 | {} | {'Aged': 0.8757285172133369, 'Pregnancy': 0.9471988795518207, 'Surveys and Questionnaires': 0.9169325860161471, 'Time Factors': 0.37499319105358914, 'Male': 0.49589017789734485, 'Mice': 0.9199224928819993, 'Cell Line, Tumor': 0.8981971861124485, 'Adolescent': 0.5374227412356612, 'Signal Transduction': 0.8231857232333997, 'Risk Factors': 0.8514905402041324, 'Prognosis': 0.8222663298448214, 'Disease Models, Animal': 0.8095387593857102, 'Animals': 0.614845375365845, 'Treatment Outcome': 0.5534121089711986} |
| 6.4297 | 0.6723 | 260 | 1.7259 | 0.8872 | 0.4416 | 0.8884 | {} | {'Aged': 0.864609290141205, 'Pregnancy': 0.9613108473300722, 'Surveys and Questionnaires': 0.6100801998660318, 'Time Factors': 0.40941222996687926, 'Male': 0.7392307692307691, 'Mice': 0.9152727128587284, 'Cell Line, Tumor': 0.9025352112676056, 'Adolescent': 0.8107964864882333, 'Signal Transduction': 0.8706997621679563, 'Risk Factors': 0.8384205693296602, 'Prognosis': 0.5496411904862609, 'Disease Models, Animal': 0.8209212225570384, 'Animals': 0.6147006109576291, 'Treatment Outcome': 0.8290625167777513} |
| 6.4344 | 0.7240 | 280 | 1.7238 | 0.8931 | 0.5922 | 0.8937 | {} | {'Aged': 0.8817723333771639, 'Pregnancy': 0.9613108473300722, 'Surveys and Questionnaires': 0.9169325860161471, 'Time Factors': 0.5995950701833055, 'Male': 0.7442773436462444, 'Mice': 0.9153884215734784, 'Cell Line, Tumor': 0.9044387453146577, 'Adolescent': 0.8194530204795719, 'Signal Transduction': 0.8675769323132869, 'Risk Factors': 0.8551857021483189, 'Prognosis': 0.8209309286007249, 'Disease Models, Animal': 0.8193496535677017, 'Animals': 0.6214179879953057, 'Treatment Outcome': 0.8284012539184953} |
| 6.4469 | 0.7757 | 300 | 1.7230 | 0.8938 | 0.5921 | 0.8940 | {} | {'Aged': 0.8798708999728924, 'Pregnancy': 0.9471988795518207, 'Surveys and Questionnaires': 0.9129764265256665, 'Time Factors': 0.5981921221488455, 'Male': 0.7616477448973262, 'Mice': 0.9221110622072983, 'Cell Line, Tumor': 0.8981971861124485, 'Adolescent': 0.8131051550181505, 'Signal Transduction': 0.8434726189725243, 'Risk Factors': 0.8477658536585366, 'Prognosis': 0.8167545800011344, 'Disease Models, Animal': 0.8058045241143833, 'Animals': 0.6230391172401482, 'Treatment Outcome': 0.8301839114950607} |
| 6.4453 | 0.8274 | 320 | 1.7223 | 0.8926 | 0.5919 | 0.8932 | {} | {'Aged': 0.8750936584701314, 'Pregnancy': 0.9613108473300722, 'Surveys and Questionnaires': 0.9129764265256665, 'Time Factors': 0.5863494303861276, 'Male': 0.7541968127866836, 'Mice': 0.9175624223279579, 'Cell Line, Tumor': 0.9084849767245027, 'Adolescent': 0.8113780828883803, 'Signal Transduction': 0.869670236435887, 'Risk Factors': 0.8515838412430281, 'Prognosis': 0.8367854183927093, 'Disease Models, Animal': 0.8095387593857102, 'Animals': 0.6199099083937777, 'Treatment Outcome': 0.8300738809213386} |
| 6.325 | 0.8791 | 340 | 1.7221 | 0.8913 | 0.4435 | 0.8922 | {} | {'Aged': 0.8664618535586277, 'Pregnancy': 0.9613108473300722, 'Surveys and Questionnaires': 0.920856102003643, 'Time Factors': 0.394916214388831, 'Male': 0.7392307692307691, 'Mice': 0.9197320437609007, 'Cell Line, Tumor': 0.9015010351966875, 'Adolescent': 0.822566371681416, 'Signal Transduction': 0.8683851609383524, 'Risk Factors': 0.8515838412430281, 'Prognosis': 0.8367854183927093, 'Disease Models, Animal': 0.8158760704320216, 'Animals': 0.6192689495092902, 'Treatment Outcome': 0.82484243697479} |
| 6.3953 | 0.9308 | 360 | 1.7217 | 0.8950 | 0.4450 | 0.8955 | {} | {'Aged': 0.8732175265750584, 'Pregnancy': 0.9613108473300722, 'Surveys and Questionnaires': 0.9169325860161471, 'Time Factors': 0.3899741602067183, 'Male': 0.759071906354515, 'Mice': 0.9220524698231705, 'Cell Line, Tumor': 0.899333474396953, 'Adolescent': 0.5489533114782198, 'Signal Transduction': 0.8612083103124699, 'Risk Factors': 0.8579474732387353, 'Prognosis': 0.8277103165259512, 'Disease Models, Animal': 0.8135758534335047, 'Animals': 0.6199099083937777, 'Treatment Outcome': 0.8310431250540143} |
| 6.3281 | 0.9825 | 380 | 1.7217 | 0.8935 | 0.4443 | 0.8941 | {} | {'Aged': 0.8732175265750584, 'Pregnancy': 0.9613108473300722, 'Surveys and Questionnaires': 0.9129764265256665, 'Time Factors': 0.3974206349206349, 'Male': 0.759071906354515, 'Mice': 0.9198083320133059, 'Cell Line, Tumor': 0.9033712347895472, 'Adolescent': 0.8204232560519986, 'Signal Transduction': 0.8621080238039226, 'Risk Factors': 0.8524455849616621, 'Prognosis': 0.8296660052543481, 'Disease Models, Animal': 0.804974677609989, 'Animals': 0.6193975348591589, 'Treatment Outcome': 0.8310431250540143} |
Framework versions
- PEFT 0.18.1
- Transformers 4.51.0
- Pytorch 2.8.0+cu128
- Datasets 3.6.0
- Tokenizers 0.21.0
- Downloads last month
- 27