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.0984251968503937, | |
| "eval_steps": 50, | |
| "global_step": 50, | |
| "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 | |
| } | |
| ], | |
| "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": 7784397554098176.0, | |
| "train_batch_size": 8, | |
| "trial_name": null, | |
| "trial_params": null | |
| } | |