Instructions to use mrtineu/thinkingcap-test-submission with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mrtineu/thinkingcap-test-submission with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mrtineu/thinkingcap-test-submission") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("mrtineu/thinkingcap-test-submission") model = AutoModelForCausalLM.from_pretrained("mrtineu/thinkingcap-test-submission", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mrtineu/thinkingcap-test-submission with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mrtineu/thinkingcap-test-submission" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mrtineu/thinkingcap-test-submission", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mrtineu/thinkingcap-test-submission
- SGLang
How to use mrtineu/thinkingcap-test-submission 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 "mrtineu/thinkingcap-test-submission" \ --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": "mrtineu/thinkingcap-test-submission", "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 "mrtineu/thinkingcap-test-submission" \ --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": "mrtineu/thinkingcap-test-submission", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mrtineu/thinkingcap-test-submission with Docker Model Runner:
docker model run hf.co/mrtineu/thinkingcap-test-submission
Download code/pilot/MODAL.md from mrtineu/thinkingcap-test-submission: direct link, hf CLI and curl.
- Browser
- Download file 3.58 kB
-
https://huggingface.co/mrtineu/thinkingcap-test-submission/resolve/main/code/pilot/MODAL.md
- Command line
-
hf download hf://mrtineu/thinkingcap-test-submission/code/pilot/MODAL.md
-
curl -L -o MODAL.md https://huggingface.co/mrtineu/thinkingcap-test-submission/resolve/main/code/pilot/MODAL.md
Run on Modal
The laptop only launches the job. Models download on Modal, and all GPU work runs
there. The runner uses one A10G (24 GB), CUDA PyTorch, and a pinned CUDA llama.cpp
teacher. It starts a fresh modal-generalized run; historical laptop results are
not mixed into the NVIDIA run.
Launch from GitHub
- Create a Modal API token in your Modal workspace settings.
- In this private repository, open Settings → Secrets and variables → Actions
and add
MODAL_TOKEN_IDandMODAL_TOKEN_SECRETas repository secrets. - Open Actions → Run on Modal → Run workflow. First choose
smokemode. - Check the Modal dashboard for the result. Then launch
experimentmode withconfig_generalized.jsonand run namemodal-generalized.
The smoke job downloads the models and checks student adapter identity and
backward gradients. It does not run the full teacher/coaching experiment.
experiment runs the complete pipeline; splits downloads assets and validates
splits. GPU compatibility and the teacher startup need verification on Modal.
The GitHub job launches a detached Modal job. GitHub success confirms submission; check Modal for actual experiment completion or errors. GPU time and persistent storage use your Modal account's credits/billing. There is no scheduled run or always-on deployment. Each invocation has a 24-hour limit; resume incomplete work with the same config, run name, and code revision. Completed generation and final adapter checkpoints are reused; interrupted training restarts that arm. Only one job should run at a time because model downloads and the manifest share storage. The runner rejects overlapping execution with a file lock.
Launch from a terminal
Use a separate small client environment; the laptop's ROCm installation is unused:
uv venv .modal-venv --python 3.12
uv pip install --python .modal-venv/bin/python 'modal==1.6.2'
.modal-venv/bin/modal setup
.modal-venv/bin/modal run --detach pilot/modal_app.py --mode smoke
.modal-venv/bin/modal run --detach pilot/modal_app.py \
--config config_generalized.json --run modal-generalized --mode experiment
For a smaller pipeline check, use --config config_quick.json --run modal-quick.
Changing settings requires a new run name. Existing local runs and weights are
left on the laptop and excluded from Git and Modal uploads. Public datasets and
models are downloaded at revisions recorded in manifest.json. The Modal runner
overrides only the llama-server path, CPU threads, and ROCm attention flag, and
saves the effective config with each experiment.
Results and stopping
Use the Modal dashboard for live logs and to stop a job. Outputs and checkpoints
persist in the named volume qwen-reasoning-lab; models, data, cache, and the
updated manifest persist there too. To download a completed run:
.modal-venv/bin/modal volume get qwen-reasoning-lab \
runs/modal-generalized ./modal-results
Inspect RESULTS.md, metrics.json, status.json, and ERROR.txt if present.
Completion is recorded in complete.json. A GPU job can stop on timeout; rerun the
same command to resume. The periodic Volume snapshots and final explicit commit
preserve outputs, though abrupt termination can lose the latest unsynced writes.
Modal Volume storage remains allocated until you delete it in Modal.
Implementation follows the official CUDA guide, Volume guide, and detached training example.