Text Generation
Transformers
Safetensors
English
gemma4
image-text-to-text
peer-review
academic
scientific-reviewer
distillation
conversational
Instructions to use NhatCuong22/gemma-4-e4b-scientific-reviewer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NhatCuong22/gemma-4-e4b-scientific-reviewer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NhatCuong22/gemma-4-e4b-scientific-reviewer") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("NhatCuong22/gemma-4-e4b-scientific-reviewer") model = AutoModelForImageTextToText.from_pretrained("NhatCuong22/gemma-4-e4b-scientific-reviewer") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use NhatCuong22/gemma-4-e4b-scientific-reviewer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NhatCuong22/gemma-4-e4b-scientific-reviewer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NhatCuong22/gemma-4-e4b-scientific-reviewer", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NhatCuong22/gemma-4-e4b-scientific-reviewer
- SGLang
How to use NhatCuong22/gemma-4-e4b-scientific-reviewer 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 "NhatCuong22/gemma-4-e4b-scientific-reviewer" \ --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": "NhatCuong22/gemma-4-e4b-scientific-reviewer", "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 "NhatCuong22/gemma-4-e4b-scientific-reviewer" \ --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": "NhatCuong22/gemma-4-e4b-scientific-reviewer", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use NhatCuong22/gemma-4-e4b-scientific-reviewer with Docker Model Runner:
docker model run hf.co/NhatCuong22/gemma-4-e4b-scientific-reviewer
Upload benchmark/peerread_ft_metrics.json
Browse files
benchmark/peerread_ft_metrics.json
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"label": "v3",
|
| 3 |
+
"input": "/root/benchmark/results/peerread_v3_ft_full.jsonl",
|
| 4 |
+
"n_papers": 95,
|
| 5 |
+
"venues": {
|
| 6 |
+
"conll_2016": 3,
|
| 7 |
+
"acl_2017": 14,
|
| 8 |
+
"iclr_2017": 78
|
| 9 |
+
},
|
| 10 |
+
"gen_time_s": {
|
| 11 |
+
"mean": 98.36,
|
| 12 |
+
"median": 96.75,
|
| 13 |
+
"total_min": 155.7
|
| 14 |
+
},
|
| 15 |
+
"review_words": {
|
| 16 |
+
"mean": 548.7,
|
| 17 |
+
"median": 546
|
| 18 |
+
},
|
| 19 |
+
"T2_decision_overall": {
|
| 20 |
+
"n": 95,
|
| 21 |
+
"accept_rate_true": 0.842,
|
| 22 |
+
"accept_rate_pred": 0.905,
|
| 23 |
+
"accuracy": 0.8105,
|
| 24 |
+
"precision": 0.8605,
|
| 25 |
+
"recall": 0.925,
|
| 26 |
+
"f1": 0.8916
|
| 27 |
+
},
|
| 28 |
+
"T2_decision_per_venue": {
|
| 29 |
+
"acl_2017": {
|
| 30 |
+
"n": 14,
|
| 31 |
+
"accept_rate_true": 0.643,
|
| 32 |
+
"accept_rate_pred": 0.857,
|
| 33 |
+
"accuracy": 0.6429,
|
| 34 |
+
"precision": 0.6667,
|
| 35 |
+
"recall": 0.8889,
|
| 36 |
+
"f1": 0.7619
|
| 37 |
+
},
|
| 38 |
+
"conll_2016": {
|
| 39 |
+
"n": 3,
|
| 40 |
+
"accept_rate_true": 0.333,
|
| 41 |
+
"accept_rate_pred": 1.0,
|
| 42 |
+
"accuracy": 0.3333,
|
| 43 |
+
"precision": 0.3333,
|
| 44 |
+
"recall": 1.0,
|
| 45 |
+
"f1": 0.5
|
| 46 |
+
},
|
| 47 |
+
"iclr_2017": {
|
| 48 |
+
"n": 78,
|
| 49 |
+
"accept_rate_true": 0.897,
|
| 50 |
+
"accept_rate_pred": 0.91,
|
| 51 |
+
"accuracy": 0.859,
|
| 52 |
+
"precision": 0.9155,
|
| 53 |
+
"recall": 0.9286,
|
| 54 |
+
"f1": 0.922
|
| 55 |
+
}
|
| 56 |
+
},
|
| 57 |
+
"T1_rouge_overall": {
|
| 58 |
+
"rouge1": {
|
| 59 |
+
"n": 95,
|
| 60 |
+
"mean_pct": 27.27
|
| 61 |
+
},
|
| 62 |
+
"rouge2": {
|
| 63 |
+
"n": 95,
|
| 64 |
+
"mean_pct": 6.89
|
| 65 |
+
},
|
| 66 |
+
"rougeL": {
|
| 67 |
+
"n": 95,
|
| 68 |
+
"mean_pct": 12.32
|
| 69 |
+
}
|
| 70 |
+
},
|
| 71 |
+
"T1_rouge_per_venue": {
|
| 72 |
+
"acl_2017": {
|
| 73 |
+
"n": 14,
|
| 74 |
+
"rougeL_mean_pct": 15.22
|
| 75 |
+
},
|
| 76 |
+
"conll_2016": {
|
| 77 |
+
"n": 3,
|
| 78 |
+
"rougeL_mean_pct": 16.26
|
| 79 |
+
},
|
| 80 |
+
"iclr_2017": {
|
| 81 |
+
"n": 78,
|
| 82 |
+
"rougeL_mean_pct": 11.65
|
| 83 |
+
}
|
| 84 |
+
}
|
| 85 |
+
}
|