Test-Time Co-Evolution 4B — final (3 epochs)

A full-weight SFT checkpoint derived from Qwen/Qwen3.5-4B, in standard Hugging Face Safetensors format. Load directly from this repository; no adapter merge is required.

This is the final model after 3 epochs / 1638 optimizer steps. Model weights were saved successfully and actual text generation was tested. Optimizer and training recovery files are excluded from this inference release.

Download and run

Use a CUDA-enabled PyTorch installation appropriate for your GPU. The tested stack is PyTorch 2.8.0+cu128, Transformers 5.8.0, Accelerate 1.11.0, BF16 and SDPA on an NVIDIA A800.

hf download hahayhe/test-time-co-evolution-4B --local-dir ./test-time-co-evolution-4B
cd test-time-co-evolution-4B
pip install -r requirements-inference.txt
python inference.py --model . --prompt '请用简短中文回答:17乘以23等于多少?'

Load directly with Transformers

import torch
from transformers import AutoTokenizer, Qwen3_5ForConditionalGeneration

model_id = 'hahayhe/test-time-co-evolution-4B'
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=False)
model = Qwen3_5ForConditionalGeneration.from_pretrained(
    model_id, dtype=torch.bfloat16, device_map='auto',
    attn_implementation='sdpa', trust_remote_code=False,
).eval()
messages = [{'role': 'user', 'content': '请用简短中文回答:17乘以23等于多少?'}]
prompt = tokenizer.apply_chat_template(
    messages, tokenize=False, add_generation_prompt=True, enable_thinking=True
)
inputs = tokenizer(prompt, return_tensors='pt').to(model.device)
with torch.inference_mode():
    outputs = model.generate(**inputs, max_new_tokens=768, do_sample=False,
        use_cache=True, pad_token_id=tokenizer.pad_token_id)
response = tokenizer.decode(outputs[0, inputs['input_ids'].shape[1]:], skip_special_tokens=True)
print(response)
# To display only the final answer:
print(response.split('</think>', 1)[-1].strip())

GPU memory requirements increase with context length, batch size and inference engine. Optional compatible linear-attention kernels can improve throughput; the tested environment included flash-linear-attention 0.4.2 and causal-conv1d 1.6.2.post1.

For a vLLM version with Qwen3.5 support, load this full-weight repository normally:

vllm serve hahayhe/test-time-co-evolution-4B --dtype bfloat16 --max-model-len 32768

The validation described here used Transformers; vLLM performance has not been benchmarked for this release.

Training and validation

  • 69,820 trajectory-step samples; full language-model SFT with the vision tower and multimodal projector frozen.
  • Only the final assistant response is supervised, including reasoning and answer text. Historical messages are context.
  • Cutoff: 32,768 tokens; effective batch: 128; learning rate: 1e-5; cosine schedule with 10% warmup.
  • The original architecture context configuration is retained. Context lengths beyond the SFT cutoff have not been validated.
  • Direct final-model loading reported no missing, unexpected or shape-mismatched parameters. Arithmetic (17 * 23 = 391) and Python function generation completed with finite logits and normal end tokens. These are smoke tests, not comprehensive capability evaluations.

The original vision weights and image/video processor settings are included for complete AutoProcessor loading. This SFT used text-only data; image/video quality after fine-tuning has not been evaluated.

Files and license

Includes full model.safetensors, model/generation configuration, tokenizer and chat template, image/video processor settings, an inference example and SHA256SUMS. training_summary.json records checkpoint provenance. Training data, raw trajectories, credentials, optimizer shards and RNG state are excluded.

Apache-2.0; see LICENSE and NOTICE. Upstream: Qwen3.5-4B.

Downloads last month
13
Safetensors
Model size
5B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for hahayhe/test-time-co-evolution-4B

Finetuned
Qwen/Qwen3.5-4B
Finetuned
(1116)
this model