Text Generation
Transformers
Safetensors
English
qwen2
iol-ai-2026
linguistic-reasoning
conversational
text-generation-inference
4-bit precision
awq
Instructions to use rpant/iolai26-solve with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use rpant/iolai26-solve with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="rpant/iolai26-solve") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("rpant/iolai26-solve") model = AutoModelForCausalLM.from_pretrained("rpant/iolai26-solve", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use rpant/iolai26-solve with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "rpant/iolai26-solve" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "rpant/iolai26-solve", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/rpant/iolai26-solve
- SGLang
How to use rpant/iolai26-solve 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 "rpant/iolai26-solve" \ --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": "rpant/iolai26-solve", "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 "rpant/iolai26-solve" \ --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": "rpant/iolai26-solve", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use rpant/iolai26-solve with Docker Model Runner:
docker model run hf.co/rpant/iolai26-solve
rvpant commited on
Commit ·
b32ea24
1
Parent(s): 5a28824
Add toggle to disable match_letters assignment pass (default off) for isolation
Browse files- script.py +7 -1
- solver/pipeline.py +7 -2
script.py
CHANGED
|
@@ -40,6 +40,11 @@ SYMBOLIC_ONLY = False
|
|
| 40 |
# future submission cycle.
|
| 41 |
LEAN_MODE = os.environ.get("IOL_LEAN", "0") == "1"
|
| 42 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
# The eval sandbox has no internet; only go offline when loading local
|
| 44 |
# weights so Colab testing with a Hub MODEL_ID still downloads normally.
|
| 45 |
if MODEL_ID == "." or Path(MODEL_ID).exists():
|
|
@@ -102,7 +107,8 @@ def main(test_path: str = TEST_CSV, out_path: str = OUT_CSV) -> None:
|
|
| 102 |
results = run_pipeline(rows, client, budget,
|
| 103 |
llm_batch=LLM_BATCH, max_new_tokens=MAX_NEW_TOKENS,
|
| 104 |
checkpoint=lambda rs: write_submission(rs, out_path),
|
| 105 |
-
lean=LEAN_MODE
|
|
|
|
| 106 |
write_submission(results, out_path)
|
| 107 |
print(f"wrote {out_path}: {len(results)} rows in {budget.elapsed():.1f}s",
|
| 108 |
flush=True)
|
|
|
|
| 40 |
# future submission cycle.
|
| 41 |
LEAN_MODE = os.environ.get("IOL_LEAN", "0") == "1"
|
| 42 |
|
| 43 |
+
# MATCH_ASSIGNMENT (default False = disabled). When off, match_letters puzzles
|
| 44 |
+
# are answered by the normal free-form LLM pass. Off for now to isolate whether
|
| 45 |
+
# the assignment pass helped or hurt; flip on with IOL_MATCH_ASSIGN=1.
|
| 46 |
+
MATCH_ASSIGNMENT = os.environ.get("IOL_MATCH_ASSIGN", "0") == "1"
|
| 47 |
+
|
| 48 |
# The eval sandbox has no internet; only go offline when loading local
|
| 49 |
# weights so Colab testing with a Hub MODEL_ID still downloads normally.
|
| 50 |
if MODEL_ID == "." or Path(MODEL_ID).exists():
|
|
|
|
| 107 |
results = run_pipeline(rows, client, budget,
|
| 108 |
llm_batch=LLM_BATCH, max_new_tokens=MAX_NEW_TOKENS,
|
| 109 |
checkpoint=lambda rs: write_submission(rs, out_path),
|
| 110 |
+
lean=LEAN_MODE,
|
| 111 |
+
use_match_assignment=MATCH_ASSIGNMENT)
|
| 112 |
write_submission(results, out_path)
|
| 113 |
print(f"wrote {out_path}: {len(results)} rows in {budget.elapsed():.1f}s",
|
| 114 |
flush=True)
|
solver/pipeline.py
CHANGED
|
@@ -142,7 +142,8 @@ def run_pipeline(rows: Sequence[dict], client: Optional[LLMClient] = None,
|
|
| 142 |
conf_keep: float = CONF_KEEP, llm_batch: int = LLM_BATCH,
|
| 143 |
max_new_tokens: Optional[int] = None,
|
| 144 |
checkpoint: Optional[Callable[[List["PuzzleResult"]], None]] = None,
|
| 145 |
-
lean: bool = False
|
|
|
|
| 146 |
) -> List[PuzzleResult]:
|
| 147 |
"""`checkpoint`, when given, is called with the (complete, valid) results
|
| 148 |
after the symbolic pass and after every LLM batch — so a crash at ANY
|
|
@@ -205,7 +206,11 @@ def run_pipeline(rows: Sequence[dict], client: Optional[LLMClient] = None,
|
|
| 205 |
# (scores ~0). Solve it as an assignment from the model's own distribution
|
| 206 |
# instead. Solved puzzles get high confidence so the free-form LLM pass
|
| 207 |
# skips them; a declined puzzle falls through to that pass unchanged.
|
| 208 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 209 |
n_assigned = 0
|
| 210 |
for i, p in enumerate(puzzles):
|
| 211 |
if p is None or p.task_type != "match_letters" or budget.exhausted():
|
|
|
|
| 142 |
conf_keep: float = CONF_KEEP, llm_batch: int = LLM_BATCH,
|
| 143 |
max_new_tokens: Optional[int] = None,
|
| 144 |
checkpoint: Optional[Callable[[List["PuzzleResult"]], None]] = None,
|
| 145 |
+
lean: bool = False,
|
| 146 |
+
use_match_assignment: bool = True
|
| 147 |
) -> List[PuzzleResult]:
|
| 148 |
"""`checkpoint`, when given, is called with the (complete, valid) results
|
| 149 |
after the symbolic pass and after every LLM batch — so a crash at ANY
|
|
|
|
| 206 |
# (scores ~0). Solve it as an assignment from the model's own distribution
|
| 207 |
# instead. Solved puzzles get high confidence so the free-form LLM pass
|
| 208 |
# skips them; a declined puzzle falls through to that pass unchanged.
|
| 209 |
+
# Gated by use_match_assignment: when off, match_letters puzzles go through
|
| 210 |
+
# the normal free-form LLM pass (used to isolate this pass's effect).
|
| 211 |
+
if not use_match_assignment:
|
| 212 |
+
log("match_letters assignment pass disabled; using free-form LLM path")
|
| 213 |
+
if use_match_assignment and getattr(client, "can_score", False):
|
| 214 |
n_assigned = 0
|
| 215 |
for i, p in enumerate(puzzles):
|
| 216 |
if p is None or p.task_type != "match_letters" or budget.exhausted():
|