Instructions to use pratinavseth/cricket-captain-warmup-stage2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use pratinavseth/cricket-captain-warmup-stage2 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B-Instruct-2507") model = PeftModel.from_pretrained(base_model, "pratinavseth/cricket-captain-warmup-stage2") - Transformers
How to use pratinavseth/cricket-captain-warmup-stage2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="pratinavseth/cricket-captain-warmup-stage2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("pratinavseth/cricket-captain-warmup-stage2", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use pratinavseth/cricket-captain-warmup-stage2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "pratinavseth/cricket-captain-warmup-stage2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "pratinavseth/cricket-captain-warmup-stage2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/pratinavseth/cricket-captain-warmup-stage2
- SGLang
How to use pratinavseth/cricket-captain-warmup-stage2 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 "pratinavseth/cricket-captain-warmup-stage2" \ --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": "pratinavseth/cricket-captain-warmup-stage2", "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 "pratinavseth/cricket-captain-warmup-stage2" \ --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": "pratinavseth/cricket-captain-warmup-stage2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use pratinavseth/cricket-captain-warmup-stage2 with Docker Model Runner:
docker model run hf.co/pratinavseth/cricket-captain-warmup-stage2
CricketCaptain — Warmup Checkpoint (Stage 2)
LoRA adapter for Qwen/Qwen3.5-4B, trained with TRL GRPO in a multi-turn agentic RL loop on a custom OpenEnv cricket environment. This is the warmup checkpoint (5-over curriculum, 25 GRPO steps). The main 20-over T20 run resumes from this adapter.
Training
- Base:
Qwen/Qwen3.5-4B(bf16) - LoRA: r=64, alpha=128, dropout=0.05; targets q/k/v/o + gate/up/down → 85M trainable (~1.98% of 4.2B)
- Algorithm: GRPO via TRL (
environment_factory=CricketCaptainToolEnv) - Curriculum:
max_overs ∈ [2,2,2,2,2,3,3,3,4,4,5]sampled per rollout - Steps: 25, batch=4, num_generations=4, max_completion_length=4096, max_tool_calling_iterations=240
- Optimizer: lr=5e-6, beta=0.0 (no KL ref), temperature=0.9, top_p=0.95
- Reward composite:
0.20·r_result + 0.45·r_cricket + 0.25·r_behavior + 0.10·r_validityr_cricket— dense per-ball Dream11 fantasy proxyr_behavior— coherence + adaptation + opponent_awareness + regretr_validity— fraction of legal tool callsr_result— match outcome margin / win bonus (rare in 5-over)
Use
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-4B", torch_dtype="bfloat16", device_map="auto")
tok = AutoTokenizer.from_pretrained("Qwen/Qwen3.5-4B")
model = PeftModel.from_pretrained(base, "pratinavseth/cricket-captain-warmup-stage2")
Status
Warmup only. The trained policy that goes to head-to-head eval is the main run checkpoint (resumed from this one, lr=1e-5, 30 steps at 20-over T20, weights rebalanced to 0.35 / 0.30 / 0.25 / 0.10).
Repo: https://github.com/pratinavseth/cricket-captain-llm (OpenEnv hackathon submission).
Framework versions
- PEFT 0.19.1
- Downloads last month
- 3
Model tree for pratinavseth/cricket-captain-warmup-stage2
Base model
Qwen/Qwen3-4B-Instruct-2507