Instructions to use sail/data-mixture-human-1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sail/data-mixture-human-1b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="sail/data-mixture-human-1b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("sail/data-mixture-human-1b") model = AutoModelForCausalLM.from_pretrained("sail/data-mixture-human-1b") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use sail/data-mixture-human-1b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "sail/data-mixture-human-1b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "sail/data-mixture-human-1b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/sail/data-mixture-human-1b
- SGLang
How to use sail/data-mixture-human-1b 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 "sail/data-mixture-human-1b" \ --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": "sail/data-mixture-human-1b", "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 "sail/data-mixture-human-1b" \ --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": "sail/data-mixture-human-1b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use sail/data-mixture-human-1b with Docker Model Runner:
docker model run hf.co/sail/data-mixture-human-1b
Update README.md
Browse files
README.md
CHANGED
|
@@ -71,6 +71,7 @@ valid:
|
|
| 71 |
valid_the_pile_pile_cc: 1.0
|
| 72 |
model_name: tinyllama_1_1b
|
| 73 |
```
|
|
|
|
| 74 |
|
| 75 |
## Model Variants
|
| 76 |
|
|
@@ -98,14 +99,11 @@ We evaluated each model using [lm-evaluation-harness](https://github.com/Eleuthe
|
|
| 98 |
If you use these models in your research, please cite the RegMix paper:
|
| 99 |
|
| 100 |
```
|
| 101 |
-
@
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
archivePrefix={arXiv},
|
| 107 |
-
primaryClass={cs.CL},
|
| 108 |
-
url={https://arxiv.org/abs/2407.01492},
|
| 109 |
}
|
| 110 |
```
|
| 111 |
|
|
|
|
| 71 |
valid_the_pile_pile_cc: 1.0
|
| 72 |
model_name: tinyllama_1_1b
|
| 73 |
```
|
| 74 |
+
> Domain weights will be normalized to make sure their sum is 1.0 for train sets in our code.
|
| 75 |
|
| 76 |
## Model Variants
|
| 77 |
|
|
|
|
| 99 |
If you use these models in your research, please cite the RegMix paper:
|
| 100 |
|
| 101 |
```
|
| 102 |
+
@article{liu2024regmix,
|
| 103 |
+
title={RegMix: Data Mixture as Regression for Language Model Pre-training},
|
| 104 |
+
author={Liu, Qian and Zheng, Xiaosen and Muennighoff, Niklas and Zeng, Guangtao and Dou, Longxu and Pang, Tianyu and Jiang, Jing and Lin, Min},
|
| 105 |
+
journal={arXiv preprint arXiv:2407.01492},
|
| 106 |
+
year={2024}
|
|
|
|
|
|
|
|
|
|
| 107 |
}
|
| 108 |
```
|
| 109 |
|