Instructions to use seyabde/mistral_7b_yo_instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use seyabde/mistral_7b_yo_instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="seyabde/mistral_7b_yo_instruct")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("seyabde/mistral_7b_yo_instruct") model = AutoModelForCausalLM.from_pretrained("seyabde/mistral_7b_yo_instruct") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use seyabde/mistral_7b_yo_instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "seyabde/mistral_7b_yo_instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "seyabde/mistral_7b_yo_instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/seyabde/mistral_7b_yo_instruct
- SGLang
How to use seyabde/mistral_7b_yo_instruct 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 "seyabde/mistral_7b_yo_instruct" \ --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": "seyabde/mistral_7b_yo_instruct", "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 "seyabde/mistral_7b_yo_instruct" \ --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": "seyabde/mistral_7b_yo_instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use seyabde/mistral_7b_yo_instruct with Docker Model Runner:
docker model run hf.co/seyabde/mistral_7b_yo_instruct
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("seyabde/mistral_7b_yo_instruct")
model = AutoModelForCausalLM.from_pretrained("seyabde/mistral_7b_yo_instruct")Model Description
mistral_7b_yo_instruct is a text generation model in Yorรนbรก.
Intended uses & limitations
How to use
import requests
API_URL = "https://i8nykns7vw253vx3.us-east-1.aws.endpoints.huggingface.cloud"
headers = {
"Authorization": "Bearer hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"Content-Type": "application/json"
}
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
return response.json()
# Prompt content: "Pแบนlแบน o. Bawo ni o se wa?" ("Hello. How are you?")
output = query({
"inputs": "Pแบนlแบน o. Bawo ni o se wa?",
})
# Model response: "O dabo. O jแบน แปjแป ti o dara." ("I am safe. It was a good day.")
print(output)
Eval results
Coming soon
Limitations and bias
This model is limited by its training dataset of entity-annotated news articles from a specific span of time. This may not generalize well for all use cases in different domains.
Training data
This model is fine-tuned on 60k+ instruction-following demonstrations built from an aggregation of datasets (AfriQA, XLSum, MENYO-20k), and translations of Alpaca-gpt4).
Use and safety
We emphasize that mistral_7b_yo_instruct is intended only for research purposes and is not ready to be deployed for general use, namely because we have not designed adequate safety measures.
- Downloads last month
- 9
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="seyabde/mistral_7b_yo_instruct")