Downloads · 30 days
100
9% of all-time downloads
goldpulpy/bge-code-v1-GGUF
bge-code-v1-GGUF is a sentence similarity model from goldpulpy. Use it when you need a score for how close two texts are. The card lists the license as apache-2.0.
BGE-Code-v1 is an LLM-based code embedding model that supports code retrieval, text retrieval, and multilingual retrieval. Refer to the original model card for more details on the model.
Downloads · 30 days
100
9% of all-time downloads
All-time downloads
1.1K
Public
Repo size
13.1 GB
Likes
0
Public
Click a slice to open those files.
.gguf13.1 GB · 100%
From the Hugging Face model README
BGE-Code-v1 is an LLM-based code embedding model that supports code retrieval, text retrieval, and multilingual retrieval. Refer to the original model card for more details on the model.
You can specify the host, port:
llama-server \
--hf-repo goldpulpy/bge-code-v1-GGUF \
--hf-file bge-code-v1-Q8_0.gguf \ # Model file
--host 0.0.0.0 \ # Server host (default: 127.0.0.1)
--port 8080 \ # Server port (default: 8080)
--embeddings
127.0.0.18080After starting, the server is accessible at http://127.0.0.1:8080.
from openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:8080/v1", api_key="") # API key can be empty
response = client.embeddings.create(
model="bge-code-v1",
input="def add(a, b): return a + b"
)
embedding_vector = response.data[0].embedding
print("Embedding length:", len(embedding_vector))
print("First 10 values:", embedding_vector[:10])