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
Download wspforge/research_code/scripts/prepare_data.py from end000/Qwen3.5-0.8B-WSPForge-Math-v1: direct link, hf CLI and curl.
- Browser
- Download file 2.63 kB
-
https://huggingface.co/end000/Qwen3.5-0.8B-WSPForge-Math-v1/resolve/main/wspforge/research_code/scripts/prepare_data.py
- Command line
-
hf download hf://end000/Qwen3.5-0.8B-WSPForge-Math-v1/wspforge/research_code/scripts/prepare_data.py
-
curl -L -o prepare_data.py https://huggingface.co/end000/Qwen3.5-0.8B-WSPForge-Math-v1/resolve/main/wspforge/research_code/scripts/prepare_data.py
2.63 kB
| import hashlib | |
| import json | |
| from pathlib import Path | |
| import shutil | |
| import urllib.request | |
| from datasets import load_dataset | |
| from common import ROOT, save_json | |
| def dump(path, items): | |
| path.parent.mkdir(parents=True, exist_ok=True) | |
| path.write_text(''.join(json.dumps(x, ensure_ascii=False) + '\n' for x in items)) | |
| def main(): | |
| practice = ROOT / 'data/practice' | |
| practice.mkdir(exist_ok=True) | |
| for f in (ROOT / 'sources/lm_understand-logs/exp8_math/practice').glob('*.jsonl'): | |
| shutil.copyfile(f, practice / f.name) | |
| manifest = [] | |
| specs = [('HuggingFaceH4/MATH-500', None, 'math500'), ('openai/gsm8k', 'main', 'gsm8k')] | |
| for repo, config, name in specs: | |
| with urllib.request.urlopen(f'https://huggingface.co/api/datasets/{repo}') as response: | |
| revision = json.load(response)['sha'] | |
| ds = load_dataset(repo, config, split='test', revision=revision) | |
| if name == 'math500': | |
| items = [{'id': r['unique_id'], 'problem': r['problem'], 'answer': r['answer']} for r in ds] | |
| else: | |
| items = [{'id': f'gsm8k_test_{i}', 'problem': r['question'], 'answer': r['answer'].split('####')[-1].strip().replace(',', '')} for i, r in enumerate(ds)] | |
| path = ROOT / f'data/locked_test/{name}.jsonl' | |
| dump(path, items) | |
| manifest.append({'repo': repo, 'revision': revision, 'rows': len(items), 'sha256': hashlib.sha256(path.read_bytes()).hexdigest()}) | |
| with urllib.request.urlopen('https://api.github.com/repos/google-research/google-research/commits/master') as response: | |
| revision = json.load(response)['sha'] | |
| target = ROOT / 'sources/instruction_following_eval' | |
| target.mkdir(exist_ok=True) | |
| for name in ('instructions.py', 'instructions_registry.py', 'instructions_util.py', 'evaluation_lib.py', 'data/input_data.jsonl'): | |
| with urllib.request.urlopen(f'https://raw.githubusercontent.com/google-research/google-research/{revision}/instruction_following_eval/{name}') as response: | |
| content = response.read() | |
| out = ROOT / 'data/locked_test/ifeval.jsonl' if name.startswith('data/') else target / name | |
| out.write_bytes(content) | |
| (target / '__init__.py').touch() | |
| manifest.append({'repo': 'google-research/google-research', 'revision': revision, 'path': 'instruction_following_eval'}) | |
| save_json(ROOT / 'data/provenance.json', manifest) | |
| from split_data import main as split_data | |
| split_data() | |
| print('Данные скачаны, исследовательские и отложенные выборки разделены.') | |
| if __name__ == '__main__': | |
| main() | |