How to use from
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 "l3lab/ntp-mathlib-st-deepseek-coder-1.3b" \
    --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": "l3lab/ntp-mathlib-st-deepseek-coder-1.3b",
		"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 "l3lab/ntp-mathlib-st-deepseek-coder-1.3b" \
        --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": "l3lab/ntp-mathlib-st-deepseek-coder-1.3b",
		"prompt": "Once upon a time,",
		"max_tokens": 512,
		"temperature": 0.5
	}'
Quick Links

miniCTX: Neural Theorem Proving with (Long-)Contexts

State-tactic model from miniCTX: Neural Theorem Proving with (Long-)Contexts.

It is specifically finetuned for Lean 4 tactic prediction given proof states.

Performance

Please see our paper.

Example input

/- You are proving a theorem in Lean 4.
You are given the following information:
- The current proof state, inside [STATE]...[/STATE]

Your task is to generate the next tactic in the proof.
Put the next tactic inside [TAC]...[/TAC]
-/
[STATE]
m n : â„•
h : Nat.Coprime m n
⊢ Nat.gcd m n = 1
[/STATE]
[TAC]

Example output

rw [Nat.Coprime] at h
[/TAC]

Citation

Please cite:

@misc{hu2024minictx,
  title={miniCTX: Neural Theorem Proving with (Long-)Contexts}, 
  author={Jiewen Hu and Thomas Zhu and Sean Welleck},
  year={2024},
  eprint={2408.03350},
  archivePrefix={arXiv},
  primaryClass={cs.AI},
  url={https://arxiv.org/abs/2408.03350}, 
}
Downloads last month
7
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including l3lab/ntp-mathlib-st-deepseek-coder-1.3b

Paper for l3lab/ntp-mathlib-st-deepseek-coder-1.3b