Text Generation
Transformers
PyTorch
TensorBoard
mpt
Generated from Trainer
custom_code
text-generation-inference
Instructions to use jploski/mpt-mini-shakespeare with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jploski/mpt-mini-shakespeare with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jploski/mpt-mini-shakespeare", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jploski/mpt-mini-shakespeare", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("jploski/mpt-mini-shakespeare", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use jploski/mpt-mini-shakespeare with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jploski/mpt-mini-shakespeare" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jploski/mpt-mini-shakespeare", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/jploski/mpt-mini-shakespeare
- SGLang
How to use jploski/mpt-mini-shakespeare 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 "jploski/mpt-mini-shakespeare" \ --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": "jploski/mpt-mini-shakespeare", "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 "jploski/mpt-mini-shakespeare" \ --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": "jploski/mpt-mini-shakespeare", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use jploski/mpt-mini-shakespeare with Docker Model Runner:
docker model run hf.co/jploski/mpt-mini-shakespeare
Added link to Colab notebook used for model training
Browse files
README.md
CHANGED
|
@@ -11,7 +11,7 @@ should probably proofread and complete it, then remove this comment. -->
|
|
| 11 |
|
| 12 |
# mpt-mini-shakespeare
|
| 13 |
|
| 14 |
-
This model was trained from scratch on
|
| 15 |
|
| 16 |
## Model description
|
| 17 |
|
|
@@ -23,11 +23,13 @@ Intended just to aid debugging efforts of a GGML port of mpt-7b-storywriter.
|
|
| 23 |
|
| 24 |
## Training and evaluation data
|
| 25 |
|
| 26 |
-
|
| 27 |
|
| 28 |
## Training procedure
|
| 29 |
|
| 30 |
-
Just
|
|
|
|
|
|
|
| 31 |
|
| 32 |
### Training hyperparameters
|
| 33 |
|
|
|
|
| 11 |
|
| 12 |
# mpt-mini-shakespeare
|
| 13 |
|
| 14 |
+
This model was trained from scratch on "tinyshakespeare" text file.
|
| 15 |
|
| 16 |
## Model description
|
| 17 |
|
|
|
|
| 23 |
|
| 24 |
## Training and evaluation data
|
| 25 |
|
| 26 |
+
https://raw.githubusercontent.com/karpathy/char-rnn/master/data/tinyshakespeare/input.txt
|
| 27 |
|
| 28 |
## Training procedure
|
| 29 |
|
| 30 |
+
Just used the single tinyshakespeare text file as both the training and validation set (split up into paragraphs). See:
|
| 31 |
+
|
| 32 |
+
https://colab.research.google.com/drive/19tKIegIr0IThbItQnY2m7Y7B6AKbz6Cw?usp=sharing
|
| 33 |
|
| 34 |
### Training hyperparameters
|
| 35 |
|