Instructions to use mm/gte-Qwen2-7B-instruct-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use mm/gte-Qwen2-7B-instruct-gguf with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf mm/gte-Qwen2-7B-instruct-gguf:BF16 # Run inference directly in the terminal: llama cli -hf mm/gte-Qwen2-7B-instruct-gguf:BF16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf mm/gte-Qwen2-7B-instruct-gguf:BF16 # Run inference directly in the terminal: llama cli -hf mm/gte-Qwen2-7B-instruct-gguf:BF16
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 mm/gte-Qwen2-7B-instruct-gguf:BF16 # Run inference directly in the terminal: ./llama-cli -hf mm/gte-Qwen2-7B-instruct-gguf:BF16
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 mm/gte-Qwen2-7B-instruct-gguf:BF16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf mm/gte-Qwen2-7B-instruct-gguf:BF16
Use Docker
docker model run hf.co/mm/gte-Qwen2-7B-instruct-gguf:BF16
- LM Studio
- Jan
- Ollama
How to use mm/gte-Qwen2-7B-instruct-gguf with Ollama:
ollama run hf.co/mm/gte-Qwen2-7B-instruct-gguf:BF16
- Unsloth Studio
How to use mm/gte-Qwen2-7B-instruct-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 mm/gte-Qwen2-7B-instruct-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 mm/gte-Qwen2-7B-instruct-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for mm/gte-Qwen2-7B-instruct-gguf to start chatting
- Atomic Chat new
- Docker Model Runner
How to use mm/gte-Qwen2-7B-instruct-gguf with Docker Model Runner:
docker model run hf.co/mm/gte-Qwen2-7B-instruct-gguf:BF16
- Lemonade
How to use mm/gte-Qwen2-7B-instruct-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull mm/gte-Qwen2-7B-instruct-gguf:BF16
Run and chat with the model
lemonade run user.gte-Qwen2-7B-instruct-gguf-BF16
List all available models
lemonade list
gte-Qwen2-7B-instruct GGUF
GGUF conversion of Alibaba-NLP/gte-Qwen2-7B-instruct
Avaiable formats:
- Q2_K.gguf
- Q3_K.gguf
- Q4_K.gguf
- Q5_K.gguf
- Q6_K.gguf
- Q8_0.gguf
- F16.gguf
- BF16.gguf
Usage
Requires: llama-cpp-python
from functools import partial
import numpy as np
from llama_cpp import Llama
max_length = 512
model = Llama.from_pretrained(
repo_id="mm/gte-Qwen2-7B-instruct-gguf",
filename="*Q4_K.gguf", # Choose from the avaiable formats,
embedding=True,
n_ctx=max_length,
n_batch=max_length,
flash_attn=True,
verbose=False,
)
model.tokenize = partial(model.tokenize, special=True)
def calc_emb(s: str):
if len(model.tokenize(s.encode())) > max_length - 1:
print(
"The output will be calculated with truncation because of the length exceeding."
)
v = model.embed(s, normalize=True, truncate=True)
return np.asarray(v[-1])
s = "今日の天気は?"
t = "本日の天候は?"
print(f"cossim({s}, {t}) = {(calc_emb(s) * calc_emb(t)).sum()}")
- Downloads last month
- 48
Hardware compatibility
Log In to add your hardware
2-bit
6-bit
8-bit
16-bit
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support