Downloads · 30 days
7
13% of all-time downloads
pihu21057w/astral-134m-base
astral-134m-base is a machine learning model from pihu21057w. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Astral is a base causal language model designed for English-language text generation and language understanding tasks. It is a pretrained foundation model trained on approximately 30 billion tokens and built around a…
Downloads · 30 days
7
13% of all-time downloads
All-time downloads
56
Public
Parameters
135M
269 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors269 MB · 99%
From the Hugging Face model README
Astral is a base causal language model designed for English-language text generation and language understanding tasks. It is a pretrained foundation model trained on approximately 30 billion tokens and built around a modified Llama 3–inspired architecture. Astral is intended as a strong starting point for downstream adaptation rather than a ready-to-deploy chat model.
Astral is a base model package for researchers and developers who want to work with a locally hosted, Transformers-compatible foundation model. The repository includes:
Because Astral is a base model, it requires supervised fine-tuning, instruction tuning, or domain adaptation before it is suitable for production chat, assistant, or task-specific behavior.
trust_remote_code=True| Property | Value |
|---|---|
| Model type | Astral base causal language model |
| Architecture | Modified Llama 3–inspired decoder-only transformer |
| Training scope | English-only pretraining |
| Pretraining tokens | Approximately 30B |
| Hidden size | 576 |
| Intermediate size | 1536 |
| Number of layers | 30 |
| Attention heads | 9 |
| Key/value heads | 3 |
| Context length | 8192 |
| Vocabulary size | 49152 |
| Activation | SiLU |
| Precision | float16 |
| Use cache | Enabled |
config.json — model configuration metadata and auto-map entriesconfiguration_astral.py — custom Astral config classmodeling_astral.py — custom Astral causal language model implementationtokenizer_astral.py — custom tokenizer implementationspecial_tokens_map.json — tokenizer special-token definitionsgeneration_config.json — generation defaults for sampling and decodingInstall the core dependencies before running inference:
pip install torch transformers tokenizers accelerate
If you are loading a large model, a GPU-enabled environment is strongly recommended.
Astral is a base model and should be treated as a pretrained foundation checkpoint. It is not intended to be used directly as a polished assistant without further fine-tuning.
from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer
model_dir = "."
config = AutoConfig.from_pretrained(model_dir, trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained(model_dir, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_dir,
config=config,
trust_remote_code=True,
)
prompt = "Astral is"
inputs = tokenizer(prompt, return_tensors="pt")
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=128,
do_sample=True,
temperature=0.8,
top_p=0.95,
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
The model metadata in config.json is aligned with the custom Astral config class so that generation and loading behave consistently. In particular:
AstralForCausalLMastralauto_map block for automatic discoveryThis is important when using custom code with Transformers because otherwise the loader cannot resolve the local implementation automatically.
The tokenizer module is designed to work with the same special-token conventions expected by the model configuration. The implementation uses a BPE-based tokenizer and includes compatible special token definitions in special_tokens_map.json.
If you are using a real pretrained vocabulary artifact, make sure the tokenizer files and model weights are available in the same directory structure expected by your deployment environment.
The default generation behavior is defined in generation_config.json and can be overridden per call. Typical settings include:
Astral is suitable for:
Use the license that applies to your underlying pretrained model and tokenizer assets. The repository structure itself is provided for inference integration and should be reviewed alongside any model checkpoint terms.
If you are using this package in a research or production workflow, please preserve attribution to the original architecture and tokenization design that the implementation is based on, and clearly document the source of your pretrained weights.