Instructions to use TehVenom/MPT-7b-InstructAndStorywriting-50_50-Merge with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TehVenom/MPT-7b-InstructAndStorywriting-50_50-Merge with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="TehVenom/MPT-7b-InstructAndStorywriting-50_50-Merge", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("TehVenom/MPT-7b-InstructAndStorywriting-50_50-Merge", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("TehVenom/MPT-7b-InstructAndStorywriting-50_50-Merge", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use TehVenom/MPT-7b-InstructAndStorywriting-50_50-Merge with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "TehVenom/MPT-7b-InstructAndStorywriting-50_50-Merge" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "TehVenom/MPT-7b-InstructAndStorywriting-50_50-Merge", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/TehVenom/MPT-7b-InstructAndStorywriting-50_50-Merge
- SGLang
How to use TehVenom/MPT-7b-InstructAndStorywriting-50_50-Merge 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 "TehVenom/MPT-7b-InstructAndStorywriting-50_50-Merge" \ --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": "TehVenom/MPT-7b-InstructAndStorywriting-50_50-Merge", "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 "TehVenom/MPT-7b-InstructAndStorywriting-50_50-Merge" \ --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": "TehVenom/MPT-7b-InstructAndStorywriting-50_50-Merge", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use TehVenom/MPT-7b-InstructAndStorywriting-50_50-Merge with Docker Model Runner:
docker model run hf.co/TehVenom/MPT-7b-InstructAndStorywriting-50_50-Merge
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
MPT-7b-InstructAndStorywriting-50_50-Merge
A merge between the long context Storywriting and the short context instruct MPT-7b models.
Model Details:
This model is a merge between the following two MPT-7b models:
- 2048 CTX MTP-7b Instruct: https://huggingface.co/TehVenom/MPT-7b-instruct-V
- 65k CTX MTP-7b Storywriter: https://huggingface.co/TehVenom/MPT-7b-storywriter-Apache-2.0/
This merge was done using an weighted average merge strategy, and the end result is a model composed of:
MTP-7b Storywriter [50%] + MTP-7b Instruct [50%]
This was done under for the sake of testing the theory of how long context tunes affect attention when merged with a model that has been trained for a different purpose, on a shorter context span.
The end result is intended to be model that is capable of long prose while inheriting some of the Instruct base's Assistant / Instruct / Helpful properties.
Due to the influence of MPT-7b Storywriter, this model may generate content that is considered NSFW due to the wide array of books sampled for MPT-7b Storywriter.
The specific prompting is unknown, but try approaching it as a story / text completion prompt style first, then a mix of that and Alpaca's instruct format to see what brings most interesting results.
Read the original model card to understand how to run inference on this model.
- Downloads last month
- 812