Instructions to use Amazon-FMR/Ergo-dspark with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Amazon-FMR/Ergo-dspark with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Amazon-FMR/Ergo-dspark", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("Amazon-FMR/Ergo-dspark", trust_remote_code=True) model = AutoModel.from_pretrained("Amazon-FMR/Ergo-dspark", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from Amazon-FMR/Ergo-dspark: direct link, hf CLI and curl.
- Browser
- Download file 1.58 kB
-
https://huggingface.co/Amazon-FMR/Ergo-dspark/resolve/main/README.md
- Command line
-
hf download hf://Amazon-FMR/Ergo-dspark/README.md
-
curl -L -o README.md https://huggingface.co/Amazon-FMR/Ergo-dspark/resolve/main/README.md
1.58 kB
| library_name: transformers | |
| base_model: Amazon-FMR/Ergo | |
| license: other | |
| license_name: amazon-ergo-open-weight-license | |
| license_link: LICENSE.md | |
| tags: | |
| - speculative-decoding | |
| # Amazon Ergo DSpark | |
| Amazon Ergo DSpark is a 3.24B-parameter speculative decoding draft model for [Amazon Ergo](https://huggingface.co/Amazon-FMR/Ergo). | |
| Ergo is available on [Amazon Bedrock](https://docs.aws.amazon.com/bedrock/latest/userguide/model-card-amazon-ergo-1-0.html) at $1 per million input tokens, $0.03 per million cached input tokens, and $3 per million output tokens. | |
| ## Architecture | |
| | Component | Specification | | |
| |---|---| | |
| | Draft network | 5 decoder layers, hidden size 8,192, feed-forward size 16,384 | | |
| | Attention | Grouped-query attention, 64 query heads, 8 key/value heads, 32,768-token sliding window | | |
| | Target layer IDs | `1`, `16`, `31`, `46`, `61` | | |
| | Draft block | 8 draft tokens (`block_size: 8`) | | |
| | Confidence head | Rank-256 Markov head | | |
| | Vocabulary | 262,144 tokens | | |
| | Weights | BF16, 6.48 GB in a single safetensors file | | |
| ## Serving | |
| Use the model and tokenizer from `Amazon-FMR/Ergo` with `Amazon-FMR/Ergo-dspark` as the draft checkpoint. The serving runtime must provide the `DSparkDraftModel` implementation. | |
| See the [SGLang Ergo cookbook](https://docs.sglang.io/cookbook/autoregressive/Amazon/Ergo) and [vLLM Ergo recipe](https://recipes.vllm.ai/Amazon-FMR/Ergo) for serving instructions. | |
| To verify the weights and configuration, run `sha256sum -c SHA256SUMS` from the checkpoint directory. | |
| ## License | |
| [Amazon Ergo Open-Weights License](LICENSE.md) | |