Instructions to use StepLaw/StepLaw-N_268M-D_4.0B-LR9.766e-04-BS524288 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use StepLaw/StepLaw-N_268M-D_4.0B-LR9.766e-04-BS524288 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="StepLaw/StepLaw-N_268M-D_4.0B-LR9.766e-04-BS524288")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("StepLaw/StepLaw-N_268M-D_4.0B-LR9.766e-04-BS524288", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use StepLaw/StepLaw-N_268M-D_4.0B-LR9.766e-04-BS524288 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "StepLaw/StepLaw-N_268M-D_4.0B-LR9.766e-04-BS524288" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "StepLaw/StepLaw-N_268M-D_4.0B-LR9.766e-04-BS524288", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/StepLaw/StepLaw-N_268M-D_4.0B-LR9.766e-04-BS524288
- SGLang
How to use StepLaw/StepLaw-N_268M-D_4.0B-LR9.766e-04-BS524288 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 "StepLaw/StepLaw-N_268M-D_4.0B-LR9.766e-04-BS524288" \ --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": "StepLaw/StepLaw-N_268M-D_4.0B-LR9.766e-04-BS524288", "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 "StepLaw/StepLaw-N_268M-D_4.0B-LR9.766e-04-BS524288" \ --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": "StepLaw/StepLaw-N_268M-D_4.0B-LR9.766e-04-BS524288", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use StepLaw/StepLaw-N_268M-D_4.0B-LR9.766e-04-BS524288 with Docker Model Runner:
docker model run hf.co/StepLaw/StepLaw-N_268M-D_4.0B-LR9.766e-04-BS524288
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -23,17 +23,17 @@ This model is part of the [StepLaw-N_268M-D_4.0B](https://huggingface.co/collect
|
|
| 23 |
- **Feed-forward network size (FFN)**: 9552
|
| 24 |
- **Attention heads**: 16
|
| 25 |
- **Layers**: 8
|
| 26 |
-
- **Parameter count**:
|
| 27 |
|
| 28 |
### Training Parameters
|
| 29 |
- **Learning rate (lr)**: 9.766e-04
|
| 30 |
-
- **Batch size (bs)**:
|
| 31 |
- **Training iterations**: 9536
|
| 32 |
- **Training tokens (D)**: 5.0B
|
| 33 |
|
| 34 |
## Model Description
|
| 35 |
|
| 36 |
-
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 9.766e-04 and batch size
|
| 37 |
|
| 38 |
## Usage Example
|
| 39 |
|
|
@@ -48,7 +48,4 @@ model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True)
|
|
| 48 |
inputs = tokenizer("A long time ago in a galaxy far, far away", return_tensors="pt")
|
| 49 |
outputs = model.generate(**inputs, max_length=100)
|
| 50 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 51 |
-
```
|
| 52 |
-
|
| 53 |
-
StepLaw is an initiative to provide thousands of models for optimal hyperparameter research.
|
| 54 |
-
Visit [StepLaw Project](https://step-law.github.io/) for more information.
|
|
|
|
| 23 |
- **Feed-forward network size (FFN)**: 9552
|
| 24 |
- **Attention heads**: 16
|
| 25 |
- **Layers**: 8
|
| 26 |
+
- **Parameter count**: 268M
|
| 27 |
|
| 28 |
### Training Parameters
|
| 29 |
- **Learning rate (lr)**: 9.766e-04
|
| 30 |
+
- **Batch size (bs)**: 524288
|
| 31 |
- **Training iterations**: 9536
|
| 32 |
- **Training tokens (D)**: 5.0B
|
| 33 |
|
| 34 |
## Model Description
|
| 35 |
|
| 36 |
+
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 9.766e-04 and batch size 524288 for 9536 iterations, using a total of 5.0B training tokens.
|
| 37 |
|
| 38 |
## Usage Example
|
| 39 |
|
|
|
|
| 48 |
inputs = tokenizer("A long time ago in a galaxy far, far away", return_tensors="pt")
|
| 49 |
outputs = model.generate(**inputs, max_length=100)
|
| 50 |
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
|
| 51 |
+
```
|
|
|
|
|
|
|
|
|