Instructions to use ariG23498/looped-distilgpt2-pointer-chasing-5k-dense with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ariG23498/looped-distilgpt2-pointer-chasing-5k-dense with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ariG23498/looped-distilgpt2-pointer-chasing-5k-dense", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("ariG23498/looped-distilgpt2-pointer-chasing-5k-dense", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ariG23498/looped-distilgpt2-pointer-chasing-5k-dense with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ariG23498/looped-distilgpt2-pointer-chasing-5k-dense" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ariG23498/looped-distilgpt2-pointer-chasing-5k-dense", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ariG23498/looped-distilgpt2-pointer-chasing-5k-dense
- SGLang
How to use ariG23498/looped-distilgpt2-pointer-chasing-5k-dense 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 "ariG23498/looped-distilgpt2-pointer-chasing-5k-dense" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ariG23498/looped-distilgpt2-pointer-chasing-5k-dense", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "ariG23498/looped-distilgpt2-pointer-chasing-5k-dense" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ariG23498/looped-distilgpt2-pointer-chasing-5k-dense", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ariG23498/looped-distilgpt2-pointer-chasing-5k-dense with Docker Model Runner:
docker model run hf.co/ariG23498/looped-distilgpt2-pointer-chasing-5k-dense
looped-distilgpt2-pointer-chasing-5k-dense
DistilGPT2 fine-tuned on synthetic pointer chasing with a plain PyTorch loop. The middle blocks [2, 4) execute 1 time(s); all other blocks execute once. Weights are shared across iterations, and all parameters are trained. No KV cache is used.
Status: complete, step 5000 / 5000.
See metrics.json for exact-match accuracy by path length, history.jsonl for
training progress, and source/ for the complete recipe. The checkpoint has
81,912,576 unique parameters and executes
6 blocks per forward pass.
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "ariG23498/looped-distilgpt2-pointer-chasing-5k-dense"
tokenizer = AutoTokenizer.from_pretrained(repo, padding_side="left")
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True).eval()
prompt = "A>B B>C C>D D>E E>F F>G G>H H>A\nStart: A. Steps: 3. Answer:"
inputs = tokenizer(prompt, return_tensors="pt")
print(tokenizer.decode(model.generate(**inputs, max_new_tokens=1,
do_sample=False, use_cache=False)[0, inputs.input_ids.shape[1]:]))
Install the pinned source/requirements.txt. Inspect model.py before allowing
custom model code. Generation is ordinary autoregressive decoding without a KV
cache; this benchmark scores one unconstrained answer token from the full
vocabulary. There are eight possible answers (uniform guessing: 12.5%).
Train/validation/test graphs are disjoint. Training uses 1β3 hops; test_long
uses 4β6 hops. Longer paths are a harder generalization check. This is a toy
algorithmic task, not evidence of general reasoning. A single seed and more
compute in the looped variant do not establish a causal benefit from looping.
Check the dense baseline and inference-loop ablations before drawing conclusions.
Checkpoints contain inference weights, not optimizer state for exact resumption.
- Downloads last month
- -
Model tree for ariG23498/looped-distilgpt2-pointer-chasing-5k-dense
Base model
distilbert/distilgpt2