Text Generation
Transformers
Safetensors
llama
math
combinatorics
permutations
algebraic-combinatorics
causal-lm
text-generation-inference
Instructions to use ACDRepo/PermuFormer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ACDRepo/PermuFormer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ACDRepo/PermuFormer")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ACDRepo/PermuFormer") model = AutoModelForCausalLM.from_pretrained("ACDRepo/PermuFormer", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ACDRepo/PermuFormer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ACDRepo/PermuFormer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ACDRepo/PermuFormer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ACDRepo/PermuFormer
- SGLang
How to use ACDRepo/PermuFormer 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 "ACDRepo/PermuFormer" \ --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": "ACDRepo/PermuFormer", "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 "ACDRepo/PermuFormer" \ --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": "ACDRepo/PermuFormer", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ACDRepo/PermuFormer with Docker Model Runner:
docker model run hf.co/ACDRepo/PermuFormer
Update README.md
Browse files
README.md
CHANGED
|
@@ -50,7 +50,7 @@ Use deterministic decoding for most evaluation-style tasks. Make sure special to
|
|
| 50 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 51 |
import torch
|
| 52 |
|
| 53 |
-
model_id = "
|
| 54 |
|
| 55 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 56 |
model = AutoModelForCausalLM.from_pretrained(model_id)
|
|
@@ -100,16 +100,14 @@ Algebraic operation example:
|
|
| 100 |
|
| 101 |
## Evaluation Notes
|
| 102 |
|
| 103 |
-
The training code evaluates by exact match on the generated right-hand side after `=`.
|
| 104 |
|
| 105 |
- Overall exact match: **98.44%**
|
| 106 |
- Translation: **97.78%**
|
| 107 |
- Property/statistic tasks: **99.17%**
|
| 108 |
- Algebraic tasks: **98.36%**
|
| 109 |
|
| 110 |
-
|
| 111 |
-
|
| 112 |
-
The paper also reports that PermuFormer is substantially more accurate than frontier general-purpose LLMs on a small held-out sample from the model's symbolic test distribution, while noting that the comparison is imperfect because PermuFormer was trained directly in this syntax.
|
| 113 |
|
| 114 |
## Finetuning
|
| 115 |
|
|
@@ -120,8 +118,6 @@ PermuFormer is designed to be finetuned on specialized permutation tasks. Experi
|
|
| 120 |
- Schubert polynomial structure constants
|
| 121 |
- Kazhdan-Lusztig polynomial degree prediction
|
| 122 |
|
| 123 |
-
The repository's finetuning scripts compare starting from this pretrained checkpoint with training the same architecture from scratch.
|
| 124 |
-
|
| 125 |
## Limitations
|
| 126 |
|
| 127 |
- This is a specialist symbolic model. It expects the exact whitespace-tokenized syntax used during training and is brittle to natural-language paraphrases or malformed prompts.
|
|
@@ -132,4 +128,4 @@ The repository's finetuning scripts compare starting from this pretrained checkp
|
|
| 132 |
|
| 133 |
## Citation
|
| 134 |
|
| 135 |
-
|
|
|
|
| 50 |
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 51 |
import torch
|
| 52 |
|
| 53 |
+
model_id = "ACDRepo/permuformer"
|
| 54 |
|
| 55 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 56 |
model = AutoModelForCausalLM.from_pretrained(model_id)
|
|
|
|
| 100 |
|
| 101 |
## Evaluation Notes
|
| 102 |
|
| 103 |
+
The training code evaluates by exact match on the generated right-hand side after `=`.
|
| 104 |
|
| 105 |
- Overall exact match: **98.44%**
|
| 106 |
- Translation: **97.78%**
|
| 107 |
- Property/statistic tasks: **99.17%**
|
| 108 |
- Algebraic tasks: **98.36%**
|
| 109 |
|
| 110 |
+
PermuFormer is substantially more accurate than frontier general-purpose LLMs on a small held-out sample from the model's symbolic test distribution (though note that this comparison is imperfect because PermuFormer is trained directly in this syntax and on these tasks).
|
|
|
|
|
|
|
| 111 |
|
| 112 |
## Finetuning
|
| 113 |
|
|
|
|
| 118 |
- Schubert polynomial structure constants
|
| 119 |
- Kazhdan-Lusztig polynomial degree prediction
|
| 120 |
|
|
|
|
|
|
|
| 121 |
## Limitations
|
| 122 |
|
| 123 |
- This is a specialist symbolic model. It expects the exact whitespace-tokenized syntax used during training and is brittle to natural-language paraphrases or malformed prompts.
|
|
|
|
| 128 |
|
| 129 |
## Citation
|
| 130 |
|
| 131 |
+
Coming soon.
|