Instructions to use christopherastone/distilgpt2-proofs with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use christopherastone/distilgpt2-proofs with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="christopherastone/distilgpt2-proofs")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("christopherastone/distilgpt2-proofs") model = AutoModelForCausalLM.from_pretrained("christopherastone/distilgpt2-proofs", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use christopherastone/distilgpt2-proofs with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "christopherastone/distilgpt2-proofs" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "christopherastone/distilgpt2-proofs", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/christopherastone/distilgpt2-proofs
- SGLang
How to use christopherastone/distilgpt2-proofs 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 "christopherastone/distilgpt2-proofs" \ --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": "christopherastone/distilgpt2-proofs", "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 "christopherastone/distilgpt2-proofs" \ --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": "christopherastone/distilgpt2-proofs", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use christopherastone/distilgpt2-proofs with Docker Model Runner:
docker model run hf.co/christopherastone/distilgpt2-proofs
Commit ·
4e7b9f1
1
Parent(s): aa584d4
Update README.md
Browse filesAdded widget-text metadata
README.md
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
[DistilGPT2](https://huggingface.co/distilgpt2) English language model fine-tuned on mathematical proofs extracted from [arXiv.org](https://arxiv.org) LaTeX sources from 1992 to 2020.
|
| 2 |
|
| 3 |
Proofs have been cleaned up a bit. In particular, they use
|
| 4 |
* `CITE` for any citation
|
| 5 |
* `REF` for any reference
|
| 6 |
* `MATH` for any LaTeX mathematical formula
|
| 7 |
-
* `CASE:` for any `\
|
| 8 |
-
|
| 9 |
-
For text generation, I recommend prompts such as:
|
| 10 |
-
* `Let MATH be given.`
|
| 11 |
-
* `By the inductive hypothesis,`
|
| 12 |
-
* `If MATH is a nonempty`
|
|
|
|
| 1 |
+
---
|
| 2 |
+
widget:
|
| 3 |
+
- text: "Let MATH be given."
|
| 4 |
+
- text: "If MATH is a nonempty"
|
| 5 |
+
- text: "By the inductive hypothesis,"
|
| 6 |
+
---
|
| 7 |
[DistilGPT2](https://huggingface.co/distilgpt2) English language model fine-tuned on mathematical proofs extracted from [arXiv.org](https://arxiv.org) LaTeX sources from 1992 to 2020.
|
| 8 |
|
| 9 |
Proofs have been cleaned up a bit. In particular, they use
|
| 10 |
* `CITE` for any citation
|
| 11 |
* `REF` for any reference
|
| 12 |
* `MATH` for any LaTeX mathematical formula
|
| 13 |
+
* `CASE:` for any `\item` or labeled subcase.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|