Downloads · 30 days
35
5% of all-time downloads
gatilin/sparklm-31m-tinystories
sparklm-31m-tinystories is a text generation model from gatilin. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
This is a SparkLM checkpoint exported into a HuggingFace-compatible directory. It is intended to load through the Transformers remote-code path.
Downloads · 30 days
35
5% of all-time downloads
All-time downloads
737
Public
Parameters
34.1M
136 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors136 MB · 99%
From the Hugging Face model README
This is a SparkLM checkpoint exported into a HuggingFace-compatible directory. It is intended to load through the Transformers remote-code path.
Training loss is not a benchmark score. Publish evaluation results separately before comparing this checkpoint with other public models.
This release is suitable for reproducibility checks, loading smoke tests, and lightweight text-generation experiments. It is not a safety-aligned assistant release unless a downstream alignment and evaluation report is attached.
from transformers import AutoModelForCausalLM, AutoTokenizer
repo_id = "gatilin/sparklm-31m-tinystories"
tokenizer = AutoTokenizer.from_pretrained(repo_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo_id, trust_remote_code=True)
inputs = tokenizer("Hello SparkLM", return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=32)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
The exported remote code wraps SparkLM's native PyTorch implementation in a
transformers.PreTrainedModel interface.
A public release is considered loadable when the repository root includes:
config.jsongeneration_config.jsontokenizer_config.jsonmodel.safetensors or pytorch_model.binconfiguration_sparklm.pymodeling_sparklm.pytokenization_sparklm.pyrelease_manifest.jsonThe config and tokenizer config should expose auto_map entries so
AutoConfig, AutoTokenizer, and AutoModelForCausalLM can load with
trust_remote_code=True.
This model supports end-to-end expert-parallel training via a differentiable
all-to-all dispatch/combine primitive (_AllToAllSingle autograd.Function).
The backward pass through the EP all-to-all is a reverse all-to-all with
swapped split sizes, enabling gradient flow across EP ranks.
The exporter writes model.safetensors when the safetensors package is
available, falling back to pytorch_model.bin in minimal environments.
Run this before uploading or after cloning the repository:
python -m sparklm.cli.release.validate_hf_release gatilin/sparklm-31m-tinystories --load --generate
Launch a local inference UI against the same release:
python -m sparklm.cli.inference_webui --model gatilin/sparklm-31m-tinystories