Downloads · 30 days
7
4% of all-time downloads
smithblack-0/llama3_baseline_dev
llama3_baseline_dev is a text generation model from smithblack-0. 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.
A Llama 3-style decoder-only transformer architecture for research. No pretrained weights -- pull the architecture from the Hub and instantiate a freshly initialised model from config. Override any parameter at instan…
Downloads · 30 days
7
4% of all-time downloads
All-time downloads
170
Public
Repo size
—
Likes
0
Public
Click a slice to open those files.
.json3.6 MB · 99%
From the Hugging Face model README
A Llama 3-style decoder-only transformer architecture for research. No pretrained weights -- pull the architecture from the Hub and instantiate a freshly initialised model from config. Override any parameter at instantiation time.
Important:
trust_remote_code=Trueis required. It downloads the architecture source files from the Hub and imports them into your Python process. Review the source at smithblack-0/llama3_baseline_dev before use.
from transformers import AutoConfig, AutoModelForCausalLM, AutoTokenizer
# Pull architecture config -- override any parameter at instantiation time
config = AutoConfig.from_pretrained(
"smithblack-0/llama3_baseline_dev",
trust_remote_code=True,
num_hidden_layers=16, # example override
)
# Instantiate with fresh random weights -- no checkpoint required
model = AutoModelForCausalLM.from_config(config, trust_remote_code=True)
# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained("smithblack-0/llama3_baseline_dev")
# Save and reload after training
model.save_pretrained("./checkpoint")
model = AutoModelForCausalLM.from_pretrained("./checkpoint", trust_remote_code=True)
| Parameter | Default |
|---|---|
vocab_size | 50277 |
hidden_size | 768 |
intermediate_size | 1568 |
num_hidden_layers | 24 |
num_attention_heads | 16 |
num_key_value_heads | 4 |
head_dim | 48 |
max_position_embeddings | 8192 |
rope_theta | 500000.0 |
MIT. Clean-room synthesis: the human author has not read the Llama source code.
Architectural decisions derive from the published paper. Tokenizer is GPT-NeoX
(EleutherAI/gpt-neox-20b, Apache 2.0).