Instructions to use 42e/mathcompose-verifier-1.5b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use 42e/mathcompose-verifier-1.5b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-Math-1.5B-Instruct") model = PeftModel.from_pretrained(base_model, "42e/mathcompose-verifier-1.5b") - Transformers
How to use 42e/mathcompose-verifier-1.5b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="42e/mathcompose-verifier-1.5b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("42e/mathcompose-verifier-1.5b", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use 42e/mathcompose-verifier-1.5b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "42e/mathcompose-verifier-1.5b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "42e/mathcompose-verifier-1.5b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/42e/mathcompose-verifier-1.5b
- SGLang
How to use 42e/mathcompose-verifier-1.5b 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 "42e/mathcompose-verifier-1.5b" \ --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": "42e/mathcompose-verifier-1.5b", "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 "42e/mathcompose-verifier-1.5b" \ --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": "42e/mathcompose-verifier-1.5b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use 42e/mathcompose-verifier-1.5b with Docker Model Runner:
docker model run hf.co/42e/mathcompose-verifier-1.5b
| { | |
| "best_global_step": null, | |
| "best_metric": null, | |
| "best_model_checkpoint": null, | |
| "epoch": 0.2952755905511811, | |
| "eval_steps": 50, | |
| "global_step": 150, | |
| "is_hyper_param_search": false, | |
| "is_local_process_zero": true, | |
| "is_world_process_zero": true, | |
| "log_history": [ | |
| { | |
| "entropy": 1.437505340576172, | |
| "epoch": 0.01968503937007874, | |
| "grad_norm": 0.63671875, | |
| "learning_rate": 3.91304347826087e-05, | |
| "loss": 1.657536506652832, | |
| "mean_token_accuracy": 0.6597658038139343, | |
| "num_tokens": 115439.0, | |
| "step": 10 | |
| }, | |
| { | |
| "entropy": 1.5124324679374694, | |
| "epoch": 0.03937007874015748, | |
| "grad_norm": 0.4453125, | |
| "learning_rate": 8.260869565217392e-05, | |
| "loss": 1.4648273468017579, | |
| "mean_token_accuracy": 0.683241218328476, | |
| "num_tokens": 225264.0, | |
| "step": 20 | |
| }, | |
| { | |
| "entropy": 1.2266616582870484, | |
| "epoch": 0.05905511811023622, | |
| "grad_norm": 0.6796875, | |
| "learning_rate": 0.00012608695652173915, | |
| "loss": 1.113858699798584, | |
| "mean_token_accuracy": 0.7449506461620331, | |
| "num_tokens": 330923.0, | |
| "step": 30 | |
| }, | |
| { | |
| "entropy": 1.05804543197155, | |
| "epoch": 0.07874015748031496, | |
| "grad_norm": 0.47265625, | |
| "learning_rate": 0.00016956521739130436, | |
| "loss": 1.076363468170166, | |
| "mean_token_accuracy": 0.7455369174480438, | |
| "num_tokens": 437622.0, | |
| "step": 40 | |
| }, | |
| { | |
| "entropy": 0.9502384155988693, | |
| "epoch": 0.0984251968503937, | |
| "grad_norm": 0.5, | |
| "learning_rate": 0.00019999796688511753, | |
| "loss": 0.9587571144104003, | |
| "mean_token_accuracy": 0.7683711260557174, | |
| "num_tokens": 551175.0, | |
| "step": 50 | |
| }, | |
| { | |
| "epoch": 0.0984251968503937, | |
| "eval_entropy": 1.0894114132280703, | |
| "eval_loss": 1.0480613708496094, | |
| "eval_mean_token_accuracy": 0.745736007337217, | |
| "eval_num_tokens": 551175.0, | |
| "eval_runtime": 15.9708, | |
| "eval_samples_per_second": 26.736, | |
| "eval_steps_per_second": 3.381, | |
| "step": 50 | |
| }, | |
| { | |
| "entropy": 0.9499408066272735, | |
| "epoch": 0.11811023622047244, | |
| "grad_norm": 0.5859375, | |
| "learning_rate": 0.0001999618249203163, | |
| "loss": 0.9569917678833008, | |
| "mean_token_accuracy": 0.7686831414699554, | |
| "num_tokens": 658006.0, | |
| "step": 60 | |
| }, | |
| { | |
| "entropy": 1.0497896373271942, | |
| "epoch": 0.1377952755905512, | |
| "grad_norm": 0.52734375, | |
| "learning_rate": 0.00019988052141977201, | |
| "loss": 0.9973426818847656, | |
| "mean_token_accuracy": 0.7564341962337494, | |
| "num_tokens": 771278.0, | |
| "step": 70 | |
| }, | |
| { | |
| "entropy": 0.8503248453140259, | |
| "epoch": 0.15748031496062992, | |
| "grad_norm": 0.5, | |
| "learning_rate": 0.0001997540931154166, | |
| "loss": 0.839632225036621, | |
| "mean_token_accuracy": 0.7869657546281814, | |
| "num_tokens": 886071.0, | |
| "step": 80 | |
| }, | |
| { | |
| "entropy": 0.9232195496559144, | |
| "epoch": 0.17716535433070865, | |
| "grad_norm": 0.482421875, | |
| "learning_rate": 0.00019958259712601903, | |
| "loss": 0.8961009025573731, | |
| "mean_token_accuracy": 0.7736886650323868, | |
| "num_tokens": 996361.0, | |
| "step": 90 | |
| }, | |
| { | |
| "entropy": 0.8409020006656647, | |
| "epoch": 0.1968503937007874, | |
| "grad_norm": 0.515625, | |
| "learning_rate": 0.00019936611093137983, | |
| "loss": 0.839316463470459, | |
| "mean_token_accuracy": 0.787284591794014, | |
| "num_tokens": 1103999.0, | |
| "step": 100 | |
| }, | |
| { | |
| "epoch": 0.1968503937007874, | |
| "eval_entropy": 0.988924115896225, | |
| "eval_loss": 0.9491098523139954, | |
| "eval_mean_token_accuracy": 0.7609603978969433, | |
| "eval_num_tokens": 1103999.0, | |
| "eval_runtime": 15.8986, | |
| "eval_samples_per_second": 26.858, | |
| "eval_steps_per_second": 3.397, | |
| "step": 100 | |
| }, | |
| { | |
| "entropy": 0.8768177807331086, | |
| "epoch": 0.21653543307086615, | |
| "grad_norm": 0.41015625, | |
| "learning_rate": 0.00019910473233732668, | |
| "loss": 0.8348051071166992, | |
| "mean_token_accuracy": 0.7883853554725647, | |
| "num_tokens": 1216586.0, | |
| "step": 110 | |
| }, | |
| { | |
| "entropy": 0.8739962369203568, | |
| "epoch": 0.23622047244094488, | |
| "grad_norm": 0.59375, | |
| "learning_rate": 0.00019879857943152674, | |
| "loss": 0.8352558135986328, | |
| "mean_token_accuracy": 0.7789304822683334, | |
| "num_tokens": 1324767.0, | |
| "step": 120 | |
| }, | |
| { | |
| "entropy": 0.8777758985757828, | |
| "epoch": 0.2559055118110236, | |
| "grad_norm": 0.54296875, | |
| "learning_rate": 0.00019844779053013637, | |
| "loss": 0.8331022262573242, | |
| "mean_token_accuracy": 0.7784219890832901, | |
| "num_tokens": 1432356.0, | |
| "step": 130 | |
| }, | |
| { | |
| "entropy": 0.7877890735864639, | |
| "epoch": 0.2755905511811024, | |
| "grad_norm": 0.55078125, | |
| "learning_rate": 0.00019805252411531126, | |
| "loss": 0.7960677146911621, | |
| "mean_token_accuracy": 0.7926767230033874, | |
| "num_tokens": 1542545.0, | |
| "step": 140 | |
| }, | |
| { | |
| "entropy": 0.8658760845661163, | |
| "epoch": 0.2952755905511811, | |
| "grad_norm": 0.5625, | |
| "learning_rate": 0.0001976129587636064, | |
| "loss": 0.8095477104187012, | |
| "mean_token_accuracy": 0.7904855847358704, | |
| "num_tokens": 1654462.0, | |
| "step": 150 | |
| }, | |
| { | |
| "epoch": 0.2952755905511811, | |
| "eval_entropy": 0.9384135085123556, | |
| "eval_loss": 0.9150573015213013, | |
| "eval_mean_token_accuracy": 0.7675120333830515, | |
| "eval_num_tokens": 1654462.0, | |
| "eval_runtime": 15.91, | |
| "eval_samples_per_second": 26.839, | |
| "eval_steps_per_second": 3.394, | |
| "step": 150 | |
| } | |
| ], | |
| "logging_steps": 10, | |
| "max_steps": 1524, | |
| "num_input_tokens_seen": 0, | |
| "num_train_epochs": 3, | |
| "save_steps": 50, | |
| "stateful_callbacks": { | |
| "TrainerControl": { | |
| "args": { | |
| "should_epoch_stop": false, | |
| "should_evaluate": false, | |
| "should_log": false, | |
| "should_save": true, | |
| "should_training_stop": false | |
| }, | |
| "attributes": {} | |
| } | |
| }, | |
| "total_flos": 2.3294602578272256e+16, | |
| "train_batch_size": 8, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |