Instructions to use craa/exceptions with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use craa/exceptions with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="craa/exceptions")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("craa/exceptions", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use craa/exceptions with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "craa/exceptions" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "craa/exceptions", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/craa/exceptions
- SGLang
How to use craa/exceptions 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 "craa/exceptions" \ --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": "craa/exceptions", "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 "craa/exceptions" \ --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": "craa/exceptions", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use craa/exceptions with Docker Model Runner:
docker model run hf.co/craa/exceptions
Model card: add exp2b and base
Browse files
README.md
CHANGED
|
@@ -25,10 +25,12 @@ All models are GPT-2 small (12 layers, 12 heads, 768 hidden). Each folder holds
|
|
| 25 |
|---|---|---|---|---|
|
| 26 |
| `exp1b/` | 5 | `100M_<seed>` | 1001, 2128, 3591, 5039, 40817 | 50,257 (GPT-2) |
|
| 27 |
| `exp2a/` | 60 | `<cond>_to_<verb>_frequency_<seed>` β cond β {cost, last, resemble}, verb β {carry, drop, hit, push} | 1001, 2128, 3591, 5039, 40817 | 50,257 (GPT-2) |
|
|
|
|
| 28 |
| `exp3/` | 170 | `{high,low}_<n>_<seed>` β n β {0, 1, 2, 4, 8, 16, 32, 64, 10, 100, 128, 256, 500, 512, 1000, 1500, 2000} | 495, 634, 1208, 6910, 8397 | 52,000 (custom) |
|
|
|
|
| 29 |
|
| 30 |
Training corpora are in the dataset repo [`craa/exceptions`](https://huggingface.co/datasets/craa/exceptions);
|
| 31 |
-
the `exp2a` folder names correspond to its `frequency_<cond>_to_<verb>` configs.
|
| 32 |
|
| 33 |
## Usage
|
| 34 |
|
|
@@ -40,4 +42,7 @@ model = AutoModelForCausalLM.from_pretrained(repo, subfolder=run)
|
|
| 40 |
tokenizer = AutoTokenizer.from_pretrained(repo, subfolder=run)
|
| 41 |
```
|
| 42 |
|
|
|
|
|
|
|
|
|
|
| 43 |
Intermediate checkpoints are not published here.
|
|
|
|
| 25 |
|---|---|---|---|---|
|
| 26 |
| `exp1b/` | 5 | `100M_<seed>` | 1001, 2128, 3591, 5039, 40817 | 50,257 (GPT-2) |
|
| 27 |
| `exp2a/` | 60 | `<cond>_to_<verb>_frequency_<seed>` β cond β {cost, last, resemble}, verb β {carry, drop, hit, push} | 1001, 2128, 3591, 5039, 40817 | 50,257 (GPT-2) |
|
| 28 |
+
| `exp2b/` | 180 | `swap_<src>_to_<verb>_<seed>` β src β {last, require, take}; and `swap_<p>_<cond>_to_<verb>_<seed>` β p β {0.3, 0.7}, cond β {cost, last, resemble}; verb β {carry, drop, hit, push} | 1032, 2128, 3591, 5039, 40817 | 50,257 (GPT-2) |
|
| 29 |
| `exp3/` | 170 | `{high,low}_<n>_<seed>` β n β {0, 1, 2, 4, 8, 16, 32, 64, 10, 100, 128, 256, 500, 512, 1000, 1500, 2000} | 495, 634, 1208, 6910, 8397 | 52,000 (custom) |
|
| 30 |
+
| `base/` | 10 | `100M__<seed>`, `100M_default_<seed>` β baseline runs from 2024 | 495, 634, 1208, 6910, 8397 | 52,000 (custom) |
|
| 31 |
|
| 32 |
Training corpora are in the dataset repo [`craa/exceptions`](https://huggingface.co/datasets/craa/exceptions);
|
| 33 |
+
the `exp2a` folder names correspond to its `frequency_<cond>_to_<verb>` configs, and `exp2b` `swap_<src>_to_<verb>` to its `swap_<src>_to_<verb>` folders.
|
| 34 |
|
| 35 |
## Usage
|
| 36 |
|
|
|
|
| 42 |
tokenizer = AutoTokenizer.from_pretrained(repo, subfolder=run)
|
| 43 |
```
|
| 44 |
|
| 45 |
+
`base/100M_default_*` has no tokenizer files; it uses the same 52,000-token vocab as `exp3/`,
|
| 46 |
+
so load the tokenizer from e.g. `base/100M__<seed>` or any `exp3/` run.
|
| 47 |
+
|
| 48 |
Intermediate checkpoints are not published here.
|