Instructions to use ehristoforu/Gistral-16B-Q4_K_M-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ehristoforu/Gistral-16B-Q4_K_M-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ehristoforu/Gistral-16B-Q4_K_M-GGUF")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ehristoforu/Gistral-16B-Q4_K_M-GGUF", dtype="auto") - llama-cpp-python
How to use ehristoforu/Gistral-16B-Q4_K_M-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="ehristoforu/Gistral-16B-Q4_K_M-GGUF", filename="gistral-16b.Q4_K_M.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ehristoforu/Gistral-16B-Q4_K_M-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf ehristoforu/Gistral-16B-Q4_K_M-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf ehristoforu/Gistral-16B-Q4_K_M-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf ehristoforu/Gistral-16B-Q4_K_M-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf ehristoforu/Gistral-16B-Q4_K_M-GGUF: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 ehristoforu/Gistral-16B-Q4_K_M-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf ehristoforu/Gistral-16B-Q4_K_M-GGUF: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 ehristoforu/Gistral-16B-Q4_K_M-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf ehristoforu/Gistral-16B-Q4_K_M-GGUF:Q4_K_M
Use Docker
docker model run hf.co/ehristoforu/Gistral-16B-Q4_K_M-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use ehristoforu/Gistral-16B-Q4_K_M-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ehristoforu/Gistral-16B-Q4_K_M-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ehristoforu/Gistral-16B-Q4_K_M-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ehristoforu/Gistral-16B-Q4_K_M-GGUF:Q4_K_M
- SGLang
How to use ehristoforu/Gistral-16B-Q4_K_M-GGUF 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 "ehristoforu/Gistral-16B-Q4_K_M-GGUF" \ --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": "ehristoforu/Gistral-16B-Q4_K_M-GGUF", "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 "ehristoforu/Gistral-16B-Q4_K_M-GGUF" \ --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": "ehristoforu/Gistral-16B-Q4_K_M-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Ollama
How to use ehristoforu/Gistral-16B-Q4_K_M-GGUF with Ollama:
ollama run hf.co/ehristoforu/Gistral-16B-Q4_K_M-GGUF:Q4_K_M
- Unsloth Studio
How to use ehristoforu/Gistral-16B-Q4_K_M-GGUF 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 ehristoforu/Gistral-16B-Q4_K_M-GGUF 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 ehristoforu/Gistral-16B-Q4_K_M-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ehristoforu/Gistral-16B-Q4_K_M-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use ehristoforu/Gistral-16B-Q4_K_M-GGUF with Docker Model Runner:
docker model run hf.co/ehristoforu/Gistral-16B-Q4_K_M-GGUF:Q4_K_M
- Lemonade
How to use ehristoforu/Gistral-16B-Q4_K_M-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ehristoforu/Gistral-16B-Q4_K_M-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Gistral-16B-Q4_K_M-GGUF-Q4_K_M
List all available models
lemonade list
Gistral-16B-Q4_K_M-GGUF
This model was converted to GGUF format from ehristoforu/Gistral-16B using llama.cpp via the ggml.ai's GGUF-my-repo space.
Refer to the original model card for more details on the model.
Use with llama.cpp
Install llama.cpp through brew.
brew install ggerganov/ggerganov/llama.cpp
Invoke the llama.cpp server or the CLI.
CLI:
llama-cli --hf-repo ehristoforu/Gistral-16B-Q4_K_M-GGUF --model gistral-16b.Q4_K_M.gguf -p "The meaning to life and the universe is"
Server:
llama-server --hf-repo ehristoforu/Gistral-16B-Q4_K_M-GGUF --model gistral-16b.Q4_K_M.gguf -c 2048
Note: You can also use this checkpoint directly through the usage steps listed in the Llama.cpp repo as well.
git clone https://github.com/ggerganov/llama.cpp && cd llama.cpp && make && ./main -m gistral-16b.Q4_K_M.gguf -n 128
Gistral 16B (Mistral from 7B to 16B)
We created a model from other cool models to combine everything into one cool model.
Model Details
Model Description
- Developed by: @ehristoforu
- Model type: Text Generation (conversational)
- Language(s) (NLP): English, French, Russian, German, Japanese, Chinese, Korean, Italian, Ukrainian, Code
- Finetuned from model: mistralai/Mistral-7B-Instruct-v0.2
How to Get Started with the Model
Use the code below to get started with the model.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "ehristoforu/Gistral-16B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
messages = [
{"role": "user", "content": "What is your favourite condiment?"},
{"role": "assistant", "content": "Well, I'm quite partial to a good squeeze of fresh lemon juice. It adds just the right amount of zesty flavour to whatever I'm cooking up in the kitchen!"},
{"role": "user", "content": "Do you have mayonnaise recipes?"}
]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to("cuda")
outputs = model.generate(inputs, max_new_tokens=20)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
About merge
Base model: mistralai/Mistral-7B-Instruct-v0.2
Merge models:
- Gaivoronsky/Mistral-7B-Saiga
- snorkelai/Snorkel-Mistral-PairRM-DPO
- OpenBuddy/openbuddy-mistral2-7b-v20.3-32k
- meta-math/MetaMath-Mistral-7B
- HuggingFaceH4/mistral-7b-grok
- HuggingFaceH4/mistral-7b-anthropic
- NousResearch/Yarn-Mistral-7b-128k
- ajibawa-2023/Code-Mistral-7B
- SherlockAssistant/Mistral-7B-Instruct-Ukrainian
Merge datasets:
- HuggingFaceH4/grok-conversation-harmless
- HuggingFaceH4/ultrachat_200k
- HuggingFaceH4/ultrafeedback_binarized_fixed
- HuggingFaceH4/cai-conversation-harmless
- meta-math/MetaMathQA
- emozilla/yarn-train-tokenized-16k-mistral
- snorkelai/Snorkel-Mistral-PairRM-DPO-Dataset
- microsoft/orca-math-word-problems-200k
- m-a-p/Code-Feedback
- teknium/openhermes
- lksy/ru_instruct_gpt4
- IlyaGusev/ru_turbo_saiga
- IlyaGusev/ru_sharegpt_cleaned
- IlyaGusev/oasst1_ru_main_branch
- Downloads last month
- 29
4-bit
