Instructions to use GeneZC/MiniLoong-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GeneZC/MiniLoong-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GeneZC/MiniLoong-3B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GeneZC/MiniLoong-3B") model = AutoModelForCausalLM.from_pretrained("GeneZC/MiniLoong-3B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use GeneZC/MiniLoong-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GeneZC/MiniLoong-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GeneZC/MiniLoong-3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/GeneZC/MiniLoong-3B
- SGLang
How to use GeneZC/MiniLoong-3B 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 "GeneZC/MiniLoong-3B" \ --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": "GeneZC/MiniLoong-3B", "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 "GeneZC/MiniLoong-3B" \ --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": "GeneZC/MiniLoong-3B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use GeneZC/MiniLoong-3B with Docker Model Runner:
docker model run hf.co/GeneZC/MiniLoong-3B
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
- zh
|
| 5 |
+
license: apache-2.0
|
| 6 |
+
library_name: transformers
|
| 7 |
+
datasets:
|
| 8 |
+
- EleutherAI/pile
|
| 9 |
+
- togethercomputer/RedPajama-Data-1T
|
| 10 |
+
- p208p2002/wudao
|
| 11 |
+
widget:
|
| 12 |
+
- text: <s> 4 + 3 =
|
| 13 |
+
---
|
| 14 |
+
## MiniLoong-3B
|
| 15 |
+
|
| 16 |
+
π [arXiv](https://arxiv.org/abs/2311.07052) | π» [GitHub](https://github.com/GeneZC/MiniMA) | π€ [HuggingFace-MiniMA-3B](https://huggingface.co/GeneZC/MiniMA-3B) | π€ [HuggingFace-MiniChat-3B](https://huggingface.co/GeneZC/MiniChat-3B) | π€ [ModelScope-MiniMA-3B](https://modelscope.cn/models/GeneZC/MiniMA-3B) | π€ [ModelScope-MiniChat-3B](https://modelscope.cn/models/GeneZC/MiniChat-3B) | π€ [HuggingFace-MiniChat-1.5-3B](https://huggingface.co/GeneZC/MiniChat-1.5-3B) | π€ [HuggingFace-MiniMA-2-3B](https://huggingface.co/GeneZC/MiniMA-2-3B) | π€ [HuggingFace-MiniChat-2-3B](https://huggingface.co/GeneZC/MiniChat-2-3B) | π€ [HuggingFace-MiniMA-2-1B](https://huggingface.co/GeneZC/MiniMA-2-1B) | π€ [HuggingFace-MiniLoong-3B](https://huggingface.co/GeneZC/MiniLoong-3B) | π€ [HuggingFace-MiniMix-2/4x3B](https://huggingface.co/GeneZC/MiniMix-2_4x3B)
|
| 17 |
+
|
| 18 |
+
β Must comply with LICENSE of LLaMA-2 since it is derived from LLaMA-2.
|
| 19 |
+
|
| 20 |
+
<img src="./teaser_d.jpg" alt="teaser_d" width="700" />
|
| 21 |
+
|
| 22 |
+
## Bibtex
|
| 23 |
+
|
| 24 |
+
```bibtex
|
| 25 |
+
@article{zhang2023law,
|
| 26 |
+
title={Towards the Law of Capacity Gap in Distilling Language Models},
|
| 27 |
+
author={Zhang, Chen and Song, Dawei and Ye, Zheyu and Gao, Yan},
|
| 28 |
+
year={2023},
|
| 29 |
+
url={https://arxiv.org/abs/2311.07052}
|
| 30 |
+
}
|
| 31 |
+
```
|