Text Generation
Transformers
Safetensors
English
Russian
qwen3_5
image-text-to-text
weight-space-programming
wspforge
math
experimental
conversational
Instructions to use end000/Qwen3.5-0.8B-WSPForge-Math-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use end000/Qwen3.5-0.8B-WSPForge-Math-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="end000/Qwen3.5-0.8B-WSPForge-Math-v1") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("end000/Qwen3.5-0.8B-WSPForge-Math-v1") model = AutoModelForMultimodalLM.from_pretrained("end000/Qwen3.5-0.8B-WSPForge-Math-v1", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use end000/Qwen3.5-0.8B-WSPForge-Math-v1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "end000/Qwen3.5-0.8B-WSPForge-Math-v1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "end000/Qwen3.5-0.8B-WSPForge-Math-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/end000/Qwen3.5-0.8B-WSPForge-Math-v1
- SGLang
How to use end000/Qwen3.5-0.8B-WSPForge-Math-v1 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 "end000/Qwen3.5-0.8B-WSPForge-Math-v1" \ --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": "end000/Qwen3.5-0.8B-WSPForge-Math-v1", "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 "end000/Qwen3.5-0.8B-WSPForge-Math-v1" \ --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": "end000/Qwen3.5-0.8B-WSPForge-Math-v1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use end000/Qwen3.5-0.8B-WSPForge-Math-v1 with Docker Model Runner:
docker model run hf.co/end000/Qwen3.5-0.8B-WSPForge-Math-v1
File size: 2,574 Bytes
fc32096 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | import argparse
import json
import math
import numpy as np
from scipy.stats import binomtest
from common import rows, save_json, inside
def compare(original, edited):
def index(records):
result = {(r['id'], r['sample']): r for r in records}
if len(result) != len(records):
raise ValueError('Повторные результаты')
return result
a, b = index(original), index(edited)
if a.keys() != b.keys() or not a:
raise ValueError('Нужны одинаковые непустые наборы задач и образцов')
groups = {}
rescues = losses = 0
for key in sorted(a):
if a[key]['seed'] != b[key]['seed']:
raise ValueError('Seed не совпадает')
delta = int(b[key]['correct']) - int(a[key]['correct'])
groups.setdefault(key[0], []).append(delta)
rescues += delta == 1
losses += delta == -1
per_problem = np.array([np.mean(x) for x in groups.values()])
gain = float(per_problem.mean())
se = float(per_problem.std(ddof=1) / math.sqrt(len(per_problem))) if len(per_problem) > 1 else None
rng = np.random.default_rng(1701)
boot = np.array([rng.choice(per_problem, len(per_problem), replace=True).mean() for _ in range(10000)])
return {'problems': len(groups), 'samples': len(a), 'gain': gain, 'cluster_paired_se': se,
'problem_bootstrap_ci95': np.quantile(boot, [.025, .975]).tolist(),
'rescues': rescues, 'regressions': losses,
'mcnemar_exact_p': binomtest(rescues, rescues + losses).pvalue if rescues + losses and all(len(v) == 1 for v in groups.values()) else None,
'warning': 'Повторные образцы одной задачи объединены перед оценкой неопределённости. Подтверждение допустимо только на отложенной выборке.'}
if __name__ == '__main__':
p = argparse.ArgumentParser()
p.add_argument('original')
p.add_argument('edited')
p.add_argument('--out', required=True)
a = p.parse_args()
ja = json.loads((inside(a.original).parent / 'job.json').read_text())
jb = json.loads((inside(a.edited).parent / 'job.json').read_text())
for key in ('data_sha256', 'protocol', 'samples', 'max_tokens', 'runtime_versions', 'limit', 'set', 'seed_scheme'):
if ja[key] != jb[key]:
raise ValueError(f'Несопоставимые запуски: {key}')
save_json(a.out, compare(rows(a.original), rows(a.edited)))
|