Dedicated Endpoints

Run this model inference on single tenant GPU with unmatched speed and reliability at scale.

Learn more
Container

Run this model inference with full control and performance in your environment.

Learn more

Get help setting up a custom Dedicated Endpoints.

Talk with our engineer to get a quote for reserved GPU instances with discounts.

README

Training

  • Method: rejection-sampling fine-tuning (STaR). For each public training question, several reasoning traces were sampled from the base model; only traces whose extracted answer matched the gold answer were kept (1,205 traces from 624 questions). The adapter was trained on these with the prompt tokens masked, so loss is computed only on the reasoning + answer.
  • LoRA: rank 32, α 64, dropout 0.05, targets all attention + MLP projections (q/k/v/o/gate/up/down).
  • Optim: lr 1e-4, cosine schedule, 2 epochs, effective batch 16, bf16, gradient checkpointing.

Usage

python

from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B-Thinking-2507", dtype="bfloat16")
model = PeftModel.from_pretrained(base, "Ekkoliu/qwen3-4b-thinking-2507-math-lora")
tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-4B-Thinking-2507")

Or with vLLM (as used in the competition pipeline, with self-consistency voting):

python

from vllm import LLM
from vllm.lora.request import LoRARequest
llm = LLM("Qwen/Qwen3-4B-Thinking-2507", enable_lora=True, max_lora_rank=32)
# pass lora_request=LoRARequest("adapter", 1, "<local_or_hub_path>") to llm.chat(...)

Framework versions

  • PEFT 0.19.1

Model provider

Ekkoliu

Model tree

Base

Qwen/Qwen3-4B-Thinking-2507

Adapter

this model

Modalities

Input

Text

Output

Text

Pricing

Dedicated Endpoints

View details

Supported Functionality

Model APIs

Dedicated Endpoints

Container

More information

Explore FriendliAI today