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
File size: 3,579 Bytes
6361ca2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 | # 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
1. Create a Modal API token in your Modal workspace settings.
2. In this private repository, open **Settings → Secrets and variables → Actions**
and add `MODAL_TOKEN_ID` and `MODAL_TOKEN_SECRET` as repository secrets.
3. Open **Actions → Run on Modal → Run workflow**. First choose `smoke` mode.
4. Check the Modal dashboard for the result. Then launch `experiment` mode with
`config_generalized.json` and run name `modal-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:
```bash
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:
```bash
.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](https://modal.com/docs/guide/cuda),
[Volume guide](https://modal.com/docs/guide/volumes), and
[detached training example](https://modal.com/docs/examples/long-training).
|