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_coding_data.py from end000/Qwen3.5-0.8B-WSPForge-Math-v1: direct link, hf CLI and curl.
- Browser
- Download file 2.86 kB
-
https://huggingface.co/end000/Qwen3.5-0.8B-WSPForge-Math-v1/resolve/main/wspforge/research_code/scripts/prepare_coding_data.py
- Command line
-
hf download hf://end000/Qwen3.5-0.8B-WSPForge-Math-v1/wspforge/research_code/scripts/prepare_coding_data.py
-
curl -L -o prepare_coding_data.py https://huggingface.co/end000/Qwen3.5-0.8B-WSPForge-Math-v1/resolve/main/wspforge/research_code/scripts/prepare_coding_data.py
2.86 kB
| import ast | |
| import gzip | |
| import hashlib | |
| import json | |
| import subprocess | |
| from pathlib import Path | |
| from download_model import ROOT, fetch | |
| provenance = json.loads((ROOT/'data/provenance.json').read_text()) | |
| revision = next(r['revision'] for r in provenance if r.get('repo')=='google-research/google-research') | |
| mbpp_path = ROOT/'sources/mbpp/sanitized-mbpp.json' | |
| fetch(f'https://raw.githubusercontent.com/google-research/google-research/{revision}/mbpp/sanitized-mbpp.json',mbpp_path) | |
| records = [] | |
| with gzip.open(ROOT/'sources/human-eval/data/HumanEval.jsonl.gz','rt') as f: | |
| for row in map(json.loads,f): | |
| records.append({'id':'humaneval:'+row['task_id'],'source':'humaneval','problem':row['prompt'], | |
| 'entry_point':row['entry_point'],'test_code':row['test'], | |
| 'reference_code':row['prompt']+row['canonical_solution'],'prelude':''}) | |
| skipped = [] | |
| for row in json.loads(mbpp_path.read_text()): | |
| tree = ast.parse(row['code']) | |
| functions = {node.name:node for node in tree.body if isinstance(node,ast.FunctionDef)} | |
| entry = None | |
| for test in row['test_list']: | |
| entry = next((node.func.id for node in ast.walk(ast.parse(test)) if isinstance(node,ast.Call) and isinstance(node.func,ast.Name) and node.func.id in functions),None) | |
| if entry: | |
| break | |
| if entry is None: | |
| skipped.append(row['task_id']) | |
| continue | |
| node = functions[entry] | |
| signature = 'def '+entry+'('+ast.unparse(node.args)+')'+(' -> '+ast.unparse(node.returns) if node.returns else '')+':' | |
| imports = '\n'.join(row.get('test_imports',[])) | |
| tests = '\n'.join(' '+line for test in row['test_list'] for line in test.split('\n')) | |
| records.append({'id':'mbpp:'+str(row['task_id']),'source':'mbpp','problem':row['prompt']+'\nRequired signature:\n'+signature, | |
| 'entry_point':entry,'test_code':imports+'\ndef check(candidate):\n '+entry+' = candidate\n'+tests, | |
| 'reference_code':imports+'\n'+row['code'],'prelude':imports}) | |
| out = ROOT/'data/coding' | |
| out.mkdir(parents=True,exist_ok=True) | |
| (out/'all_tasks.jsonl').write_text(''.join(json.dumps(r,ensure_ascii=False)+'\n' for r in records)) | |
| human_commit = subprocess.check_output(['git','rev-parse','HEAD'],cwd=ROOT/'sources/human-eval',text=True).strip() | |
| (out/'provenance.json').write_text(json.dumps({'humaneval':{'repo':'openai/human-eval','revision':human_commit}, | |
| 'mbpp':{'repo':'google-research/google-research','revision':revision, | |
| 'file_sha256':hashlib.sha256(mbpp_path.read_bytes()).hexdigest()}, | |
| 'rows':len(records),'unresolved_mbpp_entries':skipped},indent=2)) | |
| print('Prepared',len(records),'coding tasks; splits follow canonical sandbox validation.') | |