CI: Smaller embedding model for Ollama test
This commit is contained in:
parent
508165e883
commit
7c9a78abea
1 changed files with 9 additions and 22 deletions
31
.github/workflows/test_ollama.yml
vendored
31
.github/workflows/test_ollama.yml
vendored
|
|
@ -7,13 +7,8 @@ jobs:
|
|||
|
||||
run_ollama_test:
|
||||
|
||||
# needs 16 Gb RAM for phi4
|
||||
|
||||
runs-on: buildjet-4vcpu-ubuntu-2204
|
||||
# services:
|
||||
# ollama:
|
||||
# image: ollama/ollama
|
||||
# ports:
|
||||
# - 11434:11434
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
|
|
@ -28,14 +23,6 @@ jobs:
|
|||
run: |
|
||||
uv add torch
|
||||
|
||||
# - name: Install ollama
|
||||
# run: curl -fsSL https://ollama.com/install.sh | sh
|
||||
# - name: Run ollama
|
||||
# run: |
|
||||
# ollama serve --openai &
|
||||
# ollama pull llama3.2 &
|
||||
# ollama pull avr/sfr-embedding-mistral:latest
|
||||
|
||||
- name: Start Ollama container
|
||||
run: |
|
||||
docker run -d --name ollama -p 11434:11434 ollama/ollama
|
||||
|
|
@ -60,15 +47,15 @@ jobs:
|
|||
|
||||
- name: Pull required Ollama models
|
||||
run: |
|
||||
curl -X POST http://localhost:11434/api/pull -d '{"name": "phi4"}'
|
||||
curl -X POST http://localhost:11434/api/pull -d '{"name": "avr/sfr-embedding-mistral:latest"}'
|
||||
curl -X POST http://localhost:11434/api/pull -d '{"name": "phi3:mini"}'
|
||||
curl -X POST http://localhost:11434/api/pull -d '{"name": "nomic-embed-text"}'
|
||||
|
||||
- name: Call ollama API
|
||||
run: |
|
||||
curl -X POST http://localhost:11434/v1/chat/completions \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"model": "phi4",
|
||||
"model": "phi3:mini",
|
||||
"stream": false,
|
||||
"messages": [
|
||||
{ "role": "system", "content": "You are a helpful assistant." },
|
||||
|
|
@ -78,7 +65,7 @@ jobs:
|
|||
curl -X POST http://127.0.0.1:11434/api/embed \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"model": "avr/sfr-embedding-mistral:latest",
|
||||
"model": "nomic-embed-text",
|
||||
"input": "This is a test sentence to generate an embedding."
|
||||
}'
|
||||
|
||||
|
|
@ -95,10 +82,10 @@ jobs:
|
|||
LLM_PROVIDER: "ollama"
|
||||
LLM_API_KEY: "ollama"
|
||||
LLM_ENDPOINT: "http://localhost:11434/v1/"
|
||||
LLM_MODEL: "phi4"
|
||||
LLM_MODEL: "phi3:mini"
|
||||
EMBEDDING_PROVIDER: "ollama"
|
||||
EMBEDDING_MODEL: "avr/sfr-embedding-mistral:latest"
|
||||
EMBEDDING_MODEL: "nomic-embed-text"
|
||||
EMBEDDING_ENDPOINT: "http://localhost:11434/api/embed"
|
||||
EMBEDDING_DIMENSIONS: "4096"
|
||||
HUGGINGFACE_TOKENIZER: "Salesforce/SFR-Embedding-Mistral"
|
||||
EMBEDDING_DIMENSIONS: "768"
|
||||
HUGGINGFACE_TOKENIZER: "nomic-ai/nomic-embed-text-v1"
|
||||
run: uv run python ./examples/python/simple_example.py
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue