brain-zhang's picture
Upload README.md with huggingface_hub
aaf1454 verified
---
license: apache-2.0
tags:
- StepLaw
- causal-lm
language:
- en
library_name: transformers
pipeline_tag: text-generation
model-index:
- name: step2v2_0618_h576_ffnh5016_numh9_numl6_lr5.524e-03_bs512_ti1907_mlr1e-5
results: []
---
# Wandb Model Name: step2v2_0618_h576_ffnh5016_numh9_numl6_lr5.524e-03_bs512_ti1907_mlr1e-5
This model is part of the [StepLaw-N_59M-D_1.0B](https://huggingface.co/collections/StepLaw/StepLaw-N_59M-D_1.0B) collection.
## Model Specifications
### Architecture
- **Hidden size (H)**: 576
- **Feed-forward network size (FFN)**: 5016
- **Attention heads**: 9
- **Layers**: 6
- **Parameter count**: 59M
### Training Parameters
- **Learning rate (lr)**: 5.524e-03
- **Batch size (bs)**: 1048576
- **Training iterations**: 1907
- **Training tokens (D)**: 2.0B
## Model Description
StepLaw models are trained with various hyperparameter settings to enable research on scaling laws and hyperparameter optimization. This specific model was trained with learning rate 5.524e-03 and batch size 1048576 for 1907 iterations, using a total of 2.0B training tokens.
## Usage Example
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "StepLaw/StepLaw-N_59M-D_1.0B-LR5.524e-03-BS1048576"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True, use_fast=False)
model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True)
# Generate text
inputs = tokenizer("A long time ago in a galaxy far, far away", return_tensors="pt")
outputs = model.generate(**inputs, max_length=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```