Instructions to use Pythagoras-LM/Pythagoras-Prover-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Pythagoras-LM/Pythagoras-Prover-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Pythagoras-LM/Pythagoras-Prover-4B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Pythagoras-LM/Pythagoras-Prover-4B") model = AutoModelForCausalLM.from_pretrained("Pythagoras-LM/Pythagoras-Prover-4B", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Pythagoras-LM/Pythagoras-Prover-4B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Pythagoras-LM/Pythagoras-Prover-4B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Pythagoras-LM/Pythagoras-Prover-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Pythagoras-LM/Pythagoras-Prover-4B
- SGLang
How to use Pythagoras-LM/Pythagoras-Prover-4B 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 "Pythagoras-LM/Pythagoras-Prover-4B" \ --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": "Pythagoras-LM/Pythagoras-Prover-4B", "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 "Pythagoras-LM/Pythagoras-Prover-4B" \ --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": "Pythagoras-LM/Pythagoras-Prover-4B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Pythagoras-LM/Pythagoras-Prover-4B with Docker Model Runner:
docker model run hf.co/Pythagoras-LM/Pythagoras-Prover-4B
Update README.md
Browse files
README.md
CHANGED
|
@@ -6,6 +6,7 @@ pipeline_tag: text-generation
|
|
| 6 |
library_name: transformers
|
| 7 |
datasets:
|
| 8 |
- Pythagoras-LM/SFT_Dataset
|
|
|
|
| 9 |
---
|
| 10 |
<div align="center">
|
| 11 |
<img src="https://github.com/Pythagoras-LM/Pythagoras-LM.github.io/blob/main/figures/pythagoras-without-background.png?raw=true" width="240" alt="Pythagoras-Prover logo"><br>
|
|
@@ -163,7 +164,7 @@ We release our Pythagoras-Prover models, the training dataset and the new MiniF2
|
|
| 163 |
|
| 164 |
| Model | Download |
|
| 165 |
| -------- | -------- |
|
| 166 |
-
| Pythagoras-Prover-32B |
|
| 167 |
| Pythagoras-Prover-4B | [🤗Download](https://huggingface.co/Pythagoras-LM/Pythagoras-Prover-4B) |
|
| 168 |
| Pythagoras-Prover-Diffusion-4B | [🤗Download](https://huggingface.co/Pythagoras-LM/Pythagoras-Prover-Diffusion-4B) |
|
| 169 |
|
|
@@ -175,8 +176,8 @@ We release our Pythagoras-Prover models, the training dataset and the new MiniF2
|
|
| 175 |
| Dataset | Download |
|
| 176 |
| -------- | -------- |
|
| 177 |
| Pythagoras-Prover-SFT | [🤗Download](https://huggingface.co/datasets/Pythagoras-LM/SFT_Dataset) |
|
| 178 |
-
| Pythagoras-Prover-Distill-4B |
|
| 179 |
-
| Pythagoras-Prover-Distill-32B |
|
| 180 |
</div>
|
| 181 |
|
| 182 |
## 5. Quick Start
|
|
|
|
| 6 |
library_name: transformers
|
| 7 |
datasets:
|
| 8 |
- Pythagoras-LM/SFT_Dataset
|
| 9 |
+
- Pythagoras-LM/SFT_Dataset_Distillation_4B
|
| 10 |
---
|
| 11 |
<div align="center">
|
| 12 |
<img src="https://github.com/Pythagoras-LM/Pythagoras-LM.github.io/blob/main/figures/pythagoras-without-background.png?raw=true" width="240" alt="Pythagoras-Prover logo"><br>
|
|
|
|
| 164 |
|
| 165 |
| Model | Download |
|
| 166 |
| -------- | -------- |
|
| 167 |
+
| Pythagoras-Prover-32B | [🤗Download](https://huggingface.co/Pythagoras-LM/Pythagoras-Prover-32B) |
|
| 168 |
| Pythagoras-Prover-4B | [🤗Download](https://huggingface.co/Pythagoras-LM/Pythagoras-Prover-4B) |
|
| 169 |
| Pythagoras-Prover-Diffusion-4B | [🤗Download](https://huggingface.co/Pythagoras-LM/Pythagoras-Prover-Diffusion-4B) |
|
| 170 |
|
|
|
|
| 176 |
| Dataset | Download |
|
| 177 |
| -------- | -------- |
|
| 178 |
| Pythagoras-Prover-SFT | [🤗Download](https://huggingface.co/datasets/Pythagoras-LM/SFT_Dataset) |
|
| 179 |
+
| Pythagoras-Prover-Distill-4B | [🤗Download](https://huggingface.co/datasets/Pythagoras-LM/SFT_Dataset_Distillation_4B) |
|
| 180 |
+
| Pythagoras-Prover-Distill-32B | [🤗Download](https://huggingface.co/datasets/Pythagoras-LM/SFT_Dataset_Distillation_32B) |
|
| 181 |
</div>
|
| 182 |
|
| 183 |
## 5. Quick Start
|