Instructions to use DanielAWrightGabrielAI/mpt-7b-storywriter-4bit-128g-65kTokens-CPU with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DanielAWrightGabrielAI/mpt-7b-storywriter-4bit-128g-65kTokens-CPU with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="DanielAWrightGabrielAI/mpt-7b-storywriter-4bit-128g-65kTokens-CPU", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("DanielAWrightGabrielAI/mpt-7b-storywriter-4bit-128g-65kTokens-CPU", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("DanielAWrightGabrielAI/mpt-7b-storywriter-4bit-128g-65kTokens-CPU", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DanielAWrightGabrielAI/mpt-7b-storywriter-4bit-128g-65kTokens-CPU with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DanielAWrightGabrielAI/mpt-7b-storywriter-4bit-128g-65kTokens-CPU" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DanielAWrightGabrielAI/mpt-7b-storywriter-4bit-128g-65kTokens-CPU", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/DanielAWrightGabrielAI/mpt-7b-storywriter-4bit-128g-65kTokens-CPU
- SGLang
How to use DanielAWrightGabrielAI/mpt-7b-storywriter-4bit-128g-65kTokens-CPU 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 "DanielAWrightGabrielAI/mpt-7b-storywriter-4bit-128g-65kTokens-CPU" \ --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": "DanielAWrightGabrielAI/mpt-7b-storywriter-4bit-128g-65kTokens-CPU", "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 "DanielAWrightGabrielAI/mpt-7b-storywriter-4bit-128g-65kTokens-CPU" \ --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": "DanielAWrightGabrielAI/mpt-7b-storywriter-4bit-128g-65kTokens-CPU", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use DanielAWrightGabrielAI/mpt-7b-storywriter-4bit-128g-65kTokens-CPU with Docker Model Runner:
docker model run hf.co/DanielAWrightGabrielAI/mpt-7b-storywriter-4bit-128g-65kTokens-CPU
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
THIS MODEL IS NOT QUITE FULLY FINISHED OR TESTED, PLEASE TAKE THIS INTO CONSIDERATION.
license: apache-2.0
tags:
- Composer
- MosaicML
- llm-foundry
- AnimusOG
- Oobabooga
- KoboldAI
- Text-Generation
- Conversational
- Uncensored
MPT-7B-StoryWriter-65k+
Quantized for KoboldAI (4bit-fork)
How to Use
This is meant to be used with the oobabooga text-generation-webui:
webui.py command flags when starting Oobabooga:
--trust-remote-code --model-type llama
MPT-7B-StoryWriter-65k+ can extrapolate even beyond 65k tokens.
Model Date
May 15, 2023
Model License
Apache-2.0 (commercial use permitted)
Documentation
- Blog post: Introducing MPT-7B: A New Standard for Open-Source, Commercially Usable LLMs
- Codebase (mosaicml/llm-foundry repo)
- Questions: Feel free to contact us via the MosaicML Community Slack!
Citation
Please cite this model using the following format:
@online{MosaicML2023Introducing,
author = {MosaicML NLP Team},
title = {Introducing MPT-7B: A New Standard for Open-Source, Commercially Usable LLMs},
year = {2023},
url = {www.mosaicml.com/blog/mpt-7b},
note = {Accessed: 2023-03-28}, % change this date
urldate = {2023-03-28} % change this date
}
- Downloads last month
- 7