Instructions to use NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story") model = AutoModelForCausalLM.from_pretrained("NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story
- SGLang
How to use NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story 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 "NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story with Docker Model Runner:
docker model run hf.co/NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story
NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story
The Mistral-7B-Instruct-v0.2-Neural-Story model, developed by NeuralNovel and funded by Techmind, is a language model finetuned from Mistral-7B-Instruct-v0.2.
Designed to generate instructive and narrative text, with a specific focus on storytelling. This fine-tune has been tailored to provide detailed and creative responses in the context of narrative and optimised for short story telling.
Based on mistralAI, with apache-2.0 license, suitable for commercial or non-commercial use.
Data-set
The model was finetuned using the Neural-Story-v1 dataset.
Benchmark
| Metric | Value |
|---|---|
| Avg. | 64.96 |
| ARC | 64.08 |
| HellaSwag | 66.89 |
| MMLU | 60.67 |
| TruthfulQA | 66.89 |
| Winogrande | 75.85 |
| GSM8K | 38.29 |
Evaluated on HuggingFaceH4/open_llm_leaderboard
Summary
Fine-tuned with the intention of generating creative and narrative text, making it more suitable for creative writing prompts and storytelling.
Out-of-Scope Use
The model may not perform well in scenarios unrelated to instructive and narrative text generation. Misuse or applications outside its designed scope may result in suboptimal outcomes.
Bias, Risks, and Limitations
The model may exhibit biases or limitations inherent in the training data. It is essential to consider these factors when deploying the model to avoid unintended consequences.
While the Neural-Story-v0.1 dataset serves as an excellent starting point for testing language models, users are advised to exercise caution, as there might be some inherent genre or writing bias.
Hardware and Training
n_epochs = 3,
n_checkpoints = 3,
batch_size = 12,
learning_rate = 1e-5,
Sincere appreciation to Techmind for their generous sponsorship.
- Downloads last month
- 39
Model tree for NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story
Base model
mistralai/Mistral-7B-Instruct-v0.2Dataset used to train NeuralNovel/Mistral-7B-Instruct-v0.2-Neural-Story
Evaluation results
- normalized accuracy on AI2 Reasoning Challenge (25-Shot)test set Open LLM Leaderboard64.080
- normalized accuracy on HellaSwag (10-Shot)validation set Open LLM Leaderboard83.970
- accuracy on MMLU (5-Shot)test set Open LLM Leaderboard60.670
- mc2 on TruthfulQA (0-shot)validation set Open LLM Leaderboard66.890
- accuracy on Winogrande (5-shot)validation set Open LLM Leaderboard75.850
- accuracy on GSM8k (5-shot)test set Open LLM Leaderboard38.290

