Instructions to use AntoineChatry/mistral-7b-python with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use AntoineChatry/mistral-7b-python with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="AntoineChatry/mistral-7b-python", filename="mistral-7b-instruct-v0.3.Q4_K_M.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use AntoineChatry/mistral-7b-python with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf AntoineChatry/mistral-7b-python:Q4_K_M # Run inference directly in the terminal: llama-cli -hf AntoineChatry/mistral-7b-python:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf AntoineChatry/mistral-7b-python:Q4_K_M # Run inference directly in the terminal: llama-cli -hf AntoineChatry/mistral-7b-python:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf AntoineChatry/mistral-7b-python:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf AntoineChatry/mistral-7b-python:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf AntoineChatry/mistral-7b-python:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf AntoineChatry/mistral-7b-python:Q4_K_M
Use Docker
docker model run hf.co/AntoineChatry/mistral-7b-python:Q4_K_M
- LM Studio
- Jan
- Ollama
How to use AntoineChatry/mistral-7b-python with Ollama:
ollama run hf.co/AntoineChatry/mistral-7b-python:Q4_K_M
- Unsloth Studio new
How to use AntoineChatry/mistral-7b-python with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for AntoineChatry/mistral-7b-python to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for AntoineChatry/mistral-7b-python to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for AntoineChatry/mistral-7b-python to start chatting
- Docker Model Runner
How to use AntoineChatry/mistral-7b-python with Docker Model Runner:
docker model run hf.co/AntoineChatry/mistral-7b-python:Q4_K_M
- Lemonade
How to use AntoineChatry/mistral-7b-python with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull AntoineChatry/mistral-7b-python:Q4_K_M
Run and chat with the model
lemonade run user.mistral-7b-python-Q4_K_M
List all available models
lemonade list
File size: 928 Bytes
b830092 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
FROM mistral-7b-instruct-v0.3.Q4_K_M.gguf
TEMPLATE """{{- if .Messages }}
{{- range $index, $_ := .Messages }}
{{- if eq .Role "user" }}
{{- if and (eq (len (slice $.Messages $index)) 1) $.Tools }}[AVAILABLE_TOOLS] {{ $.Tools }}[/AVAILABLE_TOOLS]
{{- end }}[INST] {{ if and $.System (eq (len (slice $.Messages $index)) 1) }}{{ $.System }}
{{ end }}{{ .Content }}[/INST]
{{- else if eq .Role "assistant" }}
{{- if .Content }}{{ .Content }}
{{- else if .ToolCalls }}[TOOL_CALLS] [
{{- range .ToolCalls }}{"name": "{{ .Function.Name }}", "arguments": {{ .Function.Arguments }}}
{{- end }}]
{{- end }}</s>
{{- else if eq .Role "tool" }}[TOOL_RESULTS] {"content": {{ .Content }}} [/TOOL_RESULTS]
{{- end }}
{{- end }}
{{- else }}[INST] {{ if .System }}{{ .System }}
{{ end }}{{ .Prompt }}[/INST]
{{- end }}{{ .Response }}
{{- if .Response }}</s>
{{- end }}"""
PARAMETER stop "[INST]"
PARAMETER stop "[/INST]"
PARAMETER stop "</s>" |