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
config.json `auto_map` points to `dspark.py`, which isn't in the repo
config.json has "auto_map": {"AutoModel": "dspark.DSparkDraftModel"}, but the repo has no dspark.py. https://huggingface.co/Amazon-FMR/Ergo-dspark/resolve/main/dspark.py returns 404. The repo is also tagged library_name: transformers and custom_code, so:
from transformers import AutoModel
AutoModel.from_pretrained("Amazon-FMR/Ergo-dspark", trust_remote_code=True)
# OSError: Amazon-FMR/Ergo-dspark does not appear to have a file named dspark.py.
Without trust_remote_code, model_type: "qwen3" resolves to a plain Qwen3Model. The DSpark weights don't map onto it, so the load either fails or gives a randomly initialized model.
The README says the serving runtime has to provide DSparkDraftModel. If that's intended, consider dropping auto_map and the custom_code tag, or adding a line to the README saying the checkpoint can't be loaded with Transformers AutoModel. Note that SHA256SUMS also pins config.json, so it would need regenerating.
(Checked for consistency with the target: target_layer_ids 1/16/31/46/61 out of 64 layers, hidden size 8192, vocab 262144 and mask_token_id 4 (<mask>) all match Ergo's config and tokenizer.)