Text Generation
Transformers
Safetensors
PyTorch
English
llama
causal-lm
from-scratch
pretraining
gqa
swiglu
rope
rmsnorm
text-generation-inference
Instructions to use bgraudt/mythos with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bgraudt/mythos with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="bgraudt/mythos")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("bgraudt/mythos") model = AutoModelForCausalLM.from_pretrained("bgraudt/mythos") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use bgraudt/mythos with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "bgraudt/mythos" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "bgraudt/mythos", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/bgraudt/mythos
- SGLang
How to use bgraudt/mythos 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 "bgraudt/mythos" \ --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": "bgraudt/mythos", "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 "bgraudt/mythos" \ --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": "bgraudt/mythos", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use bgraudt/mythos with Docker Model Runner:
docker model run hf.co/bgraudt/mythos
Upload folder using huggingface_hub
Browse files- README.md +10 -10
- config.json +1 -1
- model.safetensors +2 -2
- tokenizer.json +0 -0
README.md
CHANGED
|
@@ -15,7 +15,7 @@ tags:
|
|
| 15 |
- rope
|
| 16 |
- rmsnorm
|
| 17 |
model-index:
|
| 18 |
-
- name: Mythos-
|
| 19 |
results: []
|
| 20 |
widget:
|
| 21 |
- text: "The history of artificial intelligence begins with"
|
|
@@ -31,7 +31,7 @@ inference:
|
|
| 31 |
|
| 32 |
<div align="center">
|
| 33 |
|
| 34 |
-
# Mythos-
|
| 35 |
|
| 36 |
**A decoder-only language model built from scratch β LLaMA-compatible weights.**
|
| 37 |
|
|
@@ -44,7 +44,7 @@ inference:
|
|
| 44 |
|
| 45 |
---
|
| 46 |
|
| 47 |
-
>
|
| 48 |
|
| 49 |
## Model Summary
|
| 50 |
|
|
@@ -71,7 +71,7 @@ toolchains β no custom code or `trust_remote_code` required.
|
|
| 71 |
|
| 72 |
| Component | Choice | Value |
|
| 73 |
|---|---|---:|
|
| 74 |
-
| Parameters | β | **
|
| 75 |
| Hidden layers | Pre-norm decoder blocks | 24 |
|
| 76 |
| Hidden size | `d_model` | 768 |
|
| 77 |
| Intermediate size | SwiGLU hidden | 2048 |
|
|
@@ -82,7 +82,7 @@ toolchains β no custom code or `trust_remote_code` required.
|
|
| 82 |
| Normalization | **RMSNorm** (pre-norm) | Ξ΅ = 1e-05 |
|
| 83 |
| Activation | **SwiGLU** | β |
|
| 84 |
| Tied embeddings | Embedding β LM head | β
|
|
| 85 |
-
| Vocabulary | ByteLevel BPE |
|
| 86 |
| Context length | Max sequence | 2,048 |
|
| 87 |
|
| 88 |
## Quickstart
|
|
@@ -118,27 +118,27 @@ python llama.cpp/convert_hf_to_gguf.py mythos
|
|
| 118 |
|
| 119 |
### Data
|
| 120 |
|
| 121 |
-
- **Corpus:**
|
| 122 |
-
- **Tokenizer:** ByteLevel BPE trained from scratch, vocab size **
|
| 123 |
- **Training context:** 512 tokens
|
| 124 |
|
| 125 |
### Hyperparameters
|
| 126 |
|
| 127 |
| | |
|
| 128 |
|---|---:|
|
| 129 |
-
| Steps |
|
| 130 |
| Optimizer | AdamW (Ξ²β=0.9, Ξ²β=0.95, wd=0.1) |
|
| 131 |
| LR schedule | Cosine decay, 2 000-step warmup |
|
| 132 |
| Peak learning rate | 3 Γ 10β»β΄ |
|
| 133 |
| Precision | bfloat16 mixed |
|
| 134 |
-
| Hardware |
|
| 135 |
|
| 136 |
## Limitations and Intended Use
|
| 137 |
|
| 138 |
- **Base model only** β no instruction tuning, no RLHF, no safety alignment.
|
| 139 |
- English-only; non-English performance is poor.
|
| 140 |
- May reproduce biases and factual errors from the training distribution.
|
| 141 |
-
|
| 142 |
- Not suitable for medical, legal, financial, or other high-stakes applications.
|
| 143 |
|
| 144 |
## Citation
|
|
|
|
| 15 |
- rope
|
| 16 |
- rmsnorm
|
| 17 |
model-index:
|
| 18 |
+
- name: Mythos-194M
|
| 19 |
results: []
|
| 20 |
widget:
|
| 21 |
- text: "The history of artificial intelligence begins with"
|
|
|
|
| 31 |
|
| 32 |
<div align="center">
|
| 33 |
|
| 34 |
+
# Mythos-194M
|
| 35 |
|
| 36 |
**A decoder-only language model built from scratch β LLaMA-compatible weights.**
|
| 37 |
|
|
|
|
| 44 |
|
| 45 |
---
|
| 46 |
|
| 47 |
+
> **Production release.** Full pre-training run.
|
| 48 |
|
| 49 |
## Model Summary
|
| 50 |
|
|
|
|
| 71 |
|
| 72 |
| Component | Choice | Value |
|
| 73 |
|---|---|---:|
|
| 74 |
+
| Parameters | β | **194 M** |
|
| 75 |
| Hidden layers | Pre-norm decoder blocks | 24 |
|
| 76 |
| Hidden size | `d_model` | 768 |
|
| 77 |
| Intermediate size | SwiGLU hidden | 2048 |
|
|
|
|
| 82 |
| Normalization | **RMSNorm** (pre-norm) | Ξ΅ = 1e-05 |
|
| 83 |
| Activation | **SwiGLU** | β |
|
| 84 |
| Tied embeddings | Embedding β LM head | β
|
|
| 85 |
+
| Vocabulary | ByteLevel BPE | 31,021 |
|
| 86 |
| Context length | Max sequence | 2,048 |
|
| 87 |
|
| 88 |
## Quickstart
|
|
|
|
| 118 |
|
| 119 |
### Data
|
| 120 |
|
| 121 |
+
- **Corpus:** mixed web + code (details in the GitHub repo)
|
| 122 |
+
- **Tokenizer:** ByteLevel BPE trained from scratch, vocab size **31,021**
|
| 123 |
- **Training context:** 512 tokens
|
| 124 |
|
| 125 |
### Hyperparameters
|
| 126 |
|
| 127 |
| | |
|
| 128 |
|---|---:|
|
| 129 |
+
| Steps | 16,000 |
|
| 130 |
| Optimizer | AdamW (Ξ²β=0.9, Ξ²β=0.95, wd=0.1) |
|
| 131 |
| LR schedule | Cosine decay, 2 000-step warmup |
|
| 132 |
| Peak learning rate | 3 Γ 10β»β΄ |
|
| 133 |
| Precision | bfloat16 mixed |
|
| 134 |
+
| Hardware | A100 40 GB |
|
| 135 |
|
| 136 |
## Limitations and Intended Use
|
| 137 |
|
| 138 |
- **Base model only** β no instruction tuning, no RLHF, no safety alignment.
|
| 139 |
- English-only; non-English performance is poor.
|
| 140 |
- May reproduce biases and factual errors from the training distribution.
|
| 141 |
+
|
| 142 |
- Not suitable for medical, legal, financial, or other high-stakes applications.
|
| 143 |
|
| 144 |
## Citation
|
config.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
| 9 |
"num_attention_heads": 12,
|
| 10 |
"num_key_value_heads": 4,
|
| 11 |
"head_dim": 64,
|
| 12 |
-
"vocab_size":
|
| 13 |
"max_position_embeddings": 2048,
|
| 14 |
"rms_norm_eps": 1e-05,
|
| 15 |
"rope_theta": 10000.0,
|
|
|
|
| 9 |
"num_attention_heads": 12,
|
| 10 |
"num_key_value_heads": 4,
|
| 11 |
"head_dim": 64,
|
| 12 |
+
"vocab_size": 31021,
|
| 13 |
"max_position_embeddings": 2048,
|
| 14 |
"rms_norm_eps": 1e-05,
|
| 15 |
"rope_theta": 10000.0,
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e53a1840fddf1373dac13b2c3745b50a4a3ca5fcba7e668984081f5a7a5c4e0a
|
| 3 |
+
size 699451136
|
tokenizer.json
CHANGED
|
The diff for this file is too large to render.
See raw diff
|
|
|