mandarjoshi/trivia_qa
Viewer • Updated • 848k • 87.7k • 193
How to use leliuga/all-MiniLM-L6-v2-GGUF with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("leliuga/all-MiniLM-L6-v2-GGUF")
sentences = [
"That is a happy person",
"That is a happy dog",
"That is a very happy person",
"Today is a sunny day"
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [4, 4]How to use leliuga/all-MiniLM-L6-v2-GGUF with Transformers:
# Load model directly
from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("leliuga/all-MiniLM-L6-v2-GGUF")
model = AutoModel.from_pretrained("leliuga/all-MiniLM-L6-v2-GGUF")How to use leliuga/all-MiniLM-L6-v2-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="leliuga/all-MiniLM-L6-v2-GGUF", filename="all-MiniLM-L6-v2.F16.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
How to use leliuga/all-MiniLM-L6-v2-GGUF with llama.cpp:
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf leliuga/all-MiniLM-L6-v2-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf leliuga/all-MiniLM-L6-v2-GGUF:Q4_K_M
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf leliuga/all-MiniLM-L6-v2-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf leliuga/all-MiniLM-L6-v2-GGUF:Q4_K_M
# 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 leliuga/all-MiniLM-L6-v2-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf leliuga/all-MiniLM-L6-v2-GGUF:Q4_K_M
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 leliuga/all-MiniLM-L6-v2-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf leliuga/all-MiniLM-L6-v2-GGUF:Q4_K_M
docker model run hf.co/leliuga/all-MiniLM-L6-v2-GGUF:Q4_K_M
How to use leliuga/all-MiniLM-L6-v2-GGUF with Ollama:
ollama run hf.co/leliuga/all-MiniLM-L6-v2-GGUF:Q4_K_M
How to use leliuga/all-MiniLM-L6-v2-GGUF with Unsloth Studio:
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 leliuga/all-MiniLM-L6-v2-GGUF to start chatting
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 leliuga/all-MiniLM-L6-v2-GGUF to start chatting
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for leliuga/all-MiniLM-L6-v2-GGUF to start chatting
How to use leliuga/all-MiniLM-L6-v2-GGUF with Docker Model Runner:
docker model run hf.co/leliuga/all-MiniLM-L6-v2-GGUF:Q4_K_M
How to use leliuga/all-MiniLM-L6-v2-GGUF with Lemonade:
# Download Lemonade from https://lemonade-server.ai/ lemonade pull leliuga/all-MiniLM-L6-v2-GGUF:Q4_K_M
lemonade run user.all-MiniLM-L6-v2-GGUF-Q4_K_M
lemonade list
This repo contains GGUF format model files for all-MiniLM-L6-v2.
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
32-bit
Base model
sentence-transformers/all-MiniLM-L6-v2