Instructions to use Puujeeeeeeeeeeee/gemma4-e4b-cpt-round2-adapter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Puujeeeeeeeeeeee/gemma4-e4b-cpt-round2-adapter with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Puujeeeeeeeeeeee/gemma4-e4b-cpt-round1") model = PeftModel.from_pretrained(base_model, "Puujeeeeeeeeeeee/gemma4-e4b-cpt-round2-adapter") - Transformers
How to use Puujeeeeeeeeeeee/gemma4-e4b-cpt-round2-adapter with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Puujeeeeeeeeeeee/gemma4-e4b-cpt-round2-adapter")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Puujeeeeeeeeeeee/gemma4-e4b-cpt-round2-adapter", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Puujeeeeeeeeeeee/gemma4-e4b-cpt-round2-adapter with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Puujeeeeeeeeeeee/gemma4-e4b-cpt-round2-adapter" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Puujeeeeeeeeeeee/gemma4-e4b-cpt-round2-adapter", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Puujeeeeeeeeeeee/gemma4-e4b-cpt-round2-adapter
- SGLang
How to use Puujeeeeeeeeeeee/gemma4-e4b-cpt-round2-adapter 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 "Puujeeeeeeeeeeee/gemma4-e4b-cpt-round2-adapter" \ --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": "Puujeeeeeeeeeeee/gemma4-e4b-cpt-round2-adapter", "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 "Puujeeeeeeeeeeee/gemma4-e4b-cpt-round2-adapter" \ --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": "Puujeeeeeeeeeeee/gemma4-e4b-cpt-round2-adapter", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Desktop
- Docker Model Runner
How to use Puujeeeeeeeeeeee/gemma4-e4b-cpt-round2-adapter with Docker Model Runner:
docker model run hf.co/Puujeeeeeeeeeeee/gemma4-e4b-cpt-round2-adapter
| { | |
| "best_global_step": 3230, | |
| "best_metric": 1.2906097173690796, | |
| "best_model_checkpoint": "/content/drive/MyDrive/mn_cpt_v3_ckpts_round2/checkpoint-3230", | |
| "epoch": 1.0, | |
| "eval_steps": 500, | |
| "global_step": 3230, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "epoch": 0.030959752321981424, | |
| "grad_norm": 1.7435482740402222, | |
| "learning_rate": 9.977069965464679e-06, | |
| "loss": 1.3856842041015625, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.06191950464396285, | |
| "grad_norm": 4.383045673370361, | |
| "learning_rate": 9.90756854118645e-06, | |
| "loss": 1.3523806762695312, | |
| "step": 200 | |
| }, | |
| { | |
| "epoch": 0.09287925696594428, | |
| "grad_norm": 10.109758377075195, | |
| "learning_rate": 9.79215035650482e-06, | |
| "loss": 1.3374905395507812, | |
| "step": 300 | |
| }, | |
| { | |
| "epoch": 0.1238390092879257, | |
| "grad_norm": 2.4500350952148438, | |
| "learning_rate": 9.631906415918705e-06, | |
| "loss": 1.3301382446289063, | |
| "step": 400 | |
| }, | |
| { | |
| "epoch": 0.15479876160990713, | |
| "grad_norm": 2.826953887939453, | |
| "learning_rate": 9.428351444864008e-06, | |
| "loss": 1.3228797912597656, | |
| "step": 500 | |
| }, | |
| { | |
| "epoch": 0.15479876160990713, | |
| "eval_loss": 1.3230881690979004, | |
| "eval_runtime": 36.129, | |
| "eval_samples_per_second": 11.071, | |
| "eval_steps_per_second": 1.384, | |
| "step": 500 | |
| }, | |
| { | |
| "epoch": 0.18575851393188855, | |
| "grad_norm": 2.2888803482055664, | |
| "learning_rate": 9.183409571586292e-06, | |
| "loss": 1.317882080078125, | |
| "step": 600 | |
| }, | |
| { | |
| "epoch": 0.21671826625386997, | |
| "grad_norm": 3.3586924076080322, | |
| "learning_rate": 8.899396139083332e-06, | |
| "loss": 1.3019407653808595, | |
| "step": 700 | |
| }, | |
| { | |
| "epoch": 0.2476780185758514, | |
| "grad_norm": 4.1671576499938965, | |
| "learning_rate": 8.578995819042417e-06, | |
| "loss": 1.307056884765625, | |
| "step": 800 | |
| }, | |
| { | |
| "epoch": 0.2786377708978328, | |
| "grad_norm": 3.3320398330688477, | |
| "learning_rate": 8.225237234653058e-06, | |
| "loss": 1.312891082763672, | |
| "step": 900 | |
| }, | |
| { | |
| "epoch": 0.30959752321981426, | |
| "grad_norm": 3.507591485977173, | |
| "learning_rate": 7.841464332176092e-06, | |
| "loss": 1.3050839233398437, | |
| "step": 1000 | |
| }, | |
| { | |
| "epoch": 0.30959752321981426, | |
| "eval_loss": 1.3081670999526978, | |
| "eval_runtime": 26.5452, | |
| "eval_samples_per_second": 15.069, | |
| "eval_steps_per_second": 1.884, | |
| "step": 1000 | |
| }, | |
| { | |
| "epoch": 0.34055727554179566, | |
| "grad_norm": 4.539306640625, | |
| "learning_rate": 7.431304771882899e-06, | |
| "loss": 1.2991960144042969, | |
| "step": 1100 | |
| }, | |
| { | |
| "epoch": 0.3715170278637771, | |
| "grad_norm": 3.7326371669769287, | |
| "learning_rate": 6.998635637153249e-06, | |
| "loss": 1.2984297180175781, | |
| "step": 1200 | |
| }, | |
| { | |
| "epoch": 0.4024767801857585, | |
| "grad_norm": 3.579521894454956, | |
| "learning_rate": 6.547546785870751e-06, | |
| "loss": 1.3055659484863282, | |
| "step": 1300 | |
| }, | |
| { | |
| "epoch": 0.43343653250773995, | |
| "grad_norm": 3.2823829650878906, | |
| "learning_rate": 6.082302190541269e-06, | |
| "loss": 1.294408721923828, | |
| "step": 1400 | |
| }, | |
| { | |
| "epoch": 0.46439628482972134, | |
| "grad_norm": 9.245798110961914, | |
| "learning_rate": 5.607299632571611e-06, | |
| "loss": 1.295184326171875, | |
| "step": 1500 | |
| }, | |
| { | |
| "epoch": 0.46439628482972134, | |
| "eval_loss": 1.3002694845199585, | |
| "eval_runtime": 26.6265, | |
| "eval_samples_per_second": 15.023, | |
| "eval_steps_per_second": 1.878, | |
| "step": 1500 | |
| }, | |
| { | |
| "epoch": 0.4953560371517028, | |
| "grad_norm": 3.497911214828491, | |
| "learning_rate": 5.127029131703213e-06, | |
| "loss": 1.2944673156738282, | |
| "step": 1600 | |
| }, | |
| { | |
| "epoch": 0.5263157894736842, | |
| "grad_norm": 4.088214874267578, | |
| "learning_rate": 4.646030503551686e-06, | |
| "loss": 1.2922651672363281, | |
| "step": 1700 | |
| }, | |
| { | |
| "epoch": 0.5572755417956656, | |
| "grad_norm": 3.931842565536499, | |
| "learning_rate": 4.168850446444794e-06, | |
| "loss": 1.29747802734375, | |
| "step": 1800 | |
| }, | |
| { | |
| "epoch": 0.5882352941176471, | |
| "grad_norm": 10.10274887084961, | |
| "learning_rate": 3.6999995632007324e-06, | |
| "loss": 1.2896998596191407, | |
| "step": 1900 | |
| }, | |
| { | |
| "epoch": 0.6191950464396285, | |
| "grad_norm": 5.449999809265137, | |
| "learning_rate": 3.243909724103639e-06, | |
| "loss": 1.2893682861328124, | |
| "step": 2000 | |
| }, | |
| { | |
| "epoch": 0.6191950464396285, | |
| "eval_loss": 1.2946323156356812, | |
| "eval_runtime": 26.668, | |
| "eval_samples_per_second": 14.999, | |
| "eval_steps_per_second": 1.875, | |
| "step": 2000 | |
| }, | |
| { | |
| "epoch": 0.6501547987616099, | |
| "grad_norm": 5.21806526184082, | |
| "learning_rate": 2.8048921741079935e-06, | |
| "loss": 1.2730223083496093, | |
| "step": 2100 | |
| }, | |
| { | |
| "epoch": 0.6811145510835913, | |
| "grad_norm": 5.030884742736816, | |
| "learning_rate": 2.38709678026871e-06, | |
| "loss": 1.3017454528808594, | |
| "step": 2200 | |
| }, | |
| { | |
| "epoch": 0.7120743034055728, | |
| "grad_norm": 4.097794055938721, | |
| "learning_rate": 1.994472804615526e-06, | |
| "loss": 1.2895455932617188, | |
| "step": 2300 | |
| }, | |
| { | |
| "epoch": 0.7430340557275542, | |
| "grad_norm": 4.602784633636475, | |
| "learning_rate": 1.6307315732709309e-06, | |
| "loss": 1.283674774169922, | |
| "step": 2400 | |
| }, | |
| { | |
| "epoch": 0.7739938080495357, | |
| "grad_norm": 7.153234004974365, | |
| "learning_rate": 1.2993113946863443e-06, | |
| "loss": 1.2933894348144532, | |
| "step": 2500 | |
| }, | |
| { | |
| "epoch": 0.7739938080495357, | |
| "eval_loss": 1.2917898893356323, | |
| "eval_runtime": 26.6306, | |
| "eval_samples_per_second": 15.02, | |
| "eval_steps_per_second": 1.878, | |
| "step": 2500 | |
| }, | |
| { | |
| "epoch": 0.804953560371517, | |
| "grad_norm": 6.6482014656066895, | |
| "learning_rate": 1.0033450586111783e-06, | |
| "loss": 1.289451904296875, | |
| "step": 2600 | |
| }, | |
| { | |
| "epoch": 0.8359133126934984, | |
| "grad_norm": 13.014872550964355, | |
| "learning_rate": 7.456302230148107e-07, | |
| "loss": 1.2901728820800782, | |
| "step": 2700 | |
| }, | |
| { | |
| "epoch": 0.8668730650154799, | |
| "grad_norm": 5.961217880249023, | |
| "learning_rate": 5.286029688826459e-07, | |
| "loss": 1.2795370483398438, | |
| "step": 2800 | |
| }, | |
| { | |
| "epoch": 0.8978328173374613, | |
| "grad_norm": 4.641078472137451, | |
| "learning_rate": 3.543147728628245e-07, | |
| "loss": 1.2775550842285157, | |
| "step": 2900 | |
| }, | |
| { | |
| "epoch": 0.9287925696594427, | |
| "grad_norm": 4.651384353637695, | |
| "learning_rate": 2.2441311543244762e-07, | |
| "loss": 1.2817430114746093, | |
| "step": 3000 | |
| }, | |
| { | |
| "epoch": 0.9287925696594427, | |
| "eval_loss": 1.2906177043914795, | |
| "eval_runtime": 26.6781, | |
| "eval_samples_per_second": 14.994, | |
| "eval_steps_per_second": 1.874, | |
| "step": 3000 | |
| }, | |
| { | |
| "epoch": 0.9597523219814241, | |
| "grad_norm": 4.312687873840332, | |
| "learning_rate": 1.4012590788698408e-07, | |
| "loss": 1.2772533416748046, | |
| "step": 3100 | |
| }, | |
| { | |
| "epoch": 0.9907120743034056, | |
| "grad_norm": 4.400423526763916, | |
| "learning_rate": 1.022498853586551e-07, | |
| "loss": 1.2894178771972655, | |
| "step": 3200 | |
| }, | |
| { | |
| "epoch": 1.0, | |
| "eval_loss": 1.2906097173690796, | |
| "eval_runtime": 26.6681, | |
| "eval_samples_per_second": 14.999, | |
| "eval_steps_per_second": 1.875, | |
| "step": 3230 | |
| } | |
| ], | |
| "logging_steps": 100, | |
| "max_steps": 3230, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 1, | |
| "save_steps": 500, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": true | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 2.5157373092010117e+18, | |
| "train_batch_size": 45, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |