Instructions to use Gemstone-Models/Gemstone-512x13 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Gemstone-Models/Gemstone-512x13 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Gemstone-Models/Gemstone-512x13")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Gemstone-Models/Gemstone-512x13") model = AutoModelForCausalLM.from_pretrained("Gemstone-Models/Gemstone-512x13") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Gemstone-Models/Gemstone-512x13 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Gemstone-Models/Gemstone-512x13" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Gemstone-Models/Gemstone-512x13", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Gemstone-Models/Gemstone-512x13
- SGLang
How to use Gemstone-Models/Gemstone-512x13 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 "Gemstone-Models/Gemstone-512x13" \ --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": "Gemstone-Models/Gemstone-512x13", "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 "Gemstone-Models/Gemstone-512x13" \ --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": "Gemstone-Models/Gemstone-512x13", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Gemstone-Models/Gemstone-512x13 with Docker Model Runner:
docker model run hf.co/Gemstone-Models/Gemstone-512x13
Update README
Browse files
README.md
CHANGED
|
@@ -1,18 +1,39 @@
|
|
| 1 |
---
|
| 2 |
-
datasets:
|
| 3 |
-
- allenai/dolma
|
| 4 |
language:
|
| 5 |
- en
|
| 6 |
-
library_name: transformers
|
| 7 |
-
license: apache-2.0
|
| 8 |
tags:
|
| 9 |
- causal-lm
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
-
#
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
##
|
| 17 |
-
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
|
|
|
|
|
|
| 2 |
language:
|
| 3 |
- en
|
|
|
|
|
|
|
| 4 |
tags:
|
| 5 |
- causal-lm
|
| 6 |
+
library_name: transformers
|
| 7 |
+
license: apache-2.0
|
| 8 |
+
datasets:
|
| 9 |
+
- allenai/dolma
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Gemstone-512x13
|
| 13 |
+
Gemstone-512x13 is part of the [Gemstone Suite of Models](https://huggingface.co/collections/tomg-group-umd/gemstone-models-679408ee3f19f1d4d00e8b10). A set of models trained with varying widths and depths.
|
| 14 |
+
|
| 15 |
+
## Training
|
| 16 |
+
We train using [litgpt](https://github.com/Lightning-AI/litgpt) and [AxoNN](https://github.com/axonn-ai/litgpt) using AMD MI250X GPUs on [Frontier](https://www.olcf.ornl.gov/olcf-resources/compute-systems/frontier/) at Oak Ridge National Laboratory with a global batch size of 2048.
|
| 17 |
+
|
| 18 |
+
## Data
|
| 19 |
+
Train and validation data is taken from non-overlapping subsets of [dolma](https://huggingface.co/datasets/allenai/dolma). As such it is _not_ an instruction model.
|
| 20 |
+
This model is trained for 350 billion tokens, we upload checkpoints every 2 billion tokens (477 steps).
|
| 21 |
+
|
| 22 |
+
## Using Gemstone-512x13
|
| 23 |
+
The Gemstones are based on the [gemma-2b](https://huggingface.co/google/gemma-2b) architecture and use [modeling_gemma.py](https://github.com/huggingface/transformers/blob/main/src/transformers/models/gemma/modeling_gemma.py) to run using the transformers library.
|
| 24 |
+
|
| 25 |
+
## Licence
|
| 26 |
+
This model is released under the [apache-2.0](https://choosealicense.com/licenses/apache-2.0/) licence.
|
| 27 |
|
| 28 |
+
## Contact
|
| 29 |
+
Please, feel free to contact us with any questions, or open a discussion thread.
|
| 30 |
|
| 31 |
+
# Citation
|
| 32 |
+
```
|
| 33 |
+
@article{mcleish2024gemstones
|
| 34 |
+
title={Gemstones: A Model Suite for Multi-Faceted Scaling Laws},
|
| 35 |
+
author={Sean McLeish and John Kirchenbauer and David Yu Miller and Siddharth Singh and Abhinav Bhatele and Micah Goldblum and Ashwinee Panda and Tom Goldstein},
|
| 36 |
+
journal={arXiv preprint arXiv:2502.},
|
| 37 |
+
year={2025}
|
| 38 |
+
}
|
| 39 |
+
```
|