Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrading llama2 to llama3 #168

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chains.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
def load_embedding_model(embedding_model_name: str, logger=BaseLogger(), config={}):
if embedding_model_name == "ollama":
embeddings = OllamaEmbeddings(
base_url=config["ollama_base_url"], model="llama2"
base_url=config["ollama_base_url"], model="llama3"
)
dimension = 4096
logger.info("Embedding: Using Ollama")
Expand Down
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ services:
dockerfile: pull_model.Dockerfile
environment:
- OLLAMA_BASE_URL=${OLLAMA_BASE_URL-http://host.docker.internal:11434}
- LLM=${LLM-llama2}
- LLM=${LLM-llama3}
networks:
- net
tty: true
Expand Down Expand Up @@ -105,7 +105,7 @@ services:
- OPENAI_API_KEY=${OPENAI_API_KEY-}
- GOOGLE_API_KEY=${GOOGLE_API_KEY-}
- OLLAMA_BASE_URL=${OLLAMA_BASE_URL-http://host.docker.internal:11434}
- LLM=${LLM-llama2}
- LLM=${LLM-llama3}
- EMBEDDING_MODEL=${EMBEDDING_MODEL-sentence_transformer}
- LANGCHAIN_ENDPOINT=${LANGCHAIN_ENDPOINT-"https://api.smith.langchain.com"}
- LANGCHAIN_TRACING_V2=${LANGCHAIN_TRACING_V2-false}
Expand Down Expand Up @@ -144,7 +144,7 @@ services:
- OPENAI_API_KEY=${OPENAI_API_KEY-}
- GOOGLE_API_KEY=${GOOGLE_API_KEY-}
- OLLAMA_BASE_URL=${OLLAMA_BASE_URL-http://host.docker.internal:11434}
- LLM=${LLM-llama2}
- LLM=${LLM-llama3}
- EMBEDDING_MODEL=${EMBEDDING_MODEL-sentence_transformer}
- LANGCHAIN_ENDPOINT=${LANGCHAIN_ENDPOINT-"https://api.smith.langchain.com"}
- LANGCHAIN_TRACING_V2=${LANGCHAIN_TRACING_V2-false}
Expand Down Expand Up @@ -185,7 +185,7 @@ services:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- GOOGLE_API_KEY=${GOOGLE_API_KEY}
- OLLAMA_BASE_URL=${OLLAMA_BASE_URL-http://host.docker.internal:11434}
- LLM=${LLM-llama2}
- LLM=${LLM-llama3}
- EMBEDDING_MODEL=${EMBEDDING_MODEL-sentence_transformer}
- LANGCHAIN_ENDPOINT=${LANGCHAIN_ENDPOINT-"https://api.smith.langchain.com"}
- LANGCHAIN_TRACING_V2=${LANGCHAIN_TRACING_V2-false}
Expand Down
8 changes: 4 additions & 4 deletions env.example
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#*****************************************************************
# LLM and Embedding Model
#*****************************************************************
LLM=llama2 #or any Ollama model tag, gpt-4, gpt-3.5, or claudev2
LLM=llama3 #or any Ollama model tag, gpt-4, gpt-3.5, or claudev2
EMBEDDING_MODEL=sentence_transformer #or google-genai-embedding-001 openai, ollama, or aws

#*****************************************************************
# Neo4j
#*****************************************************************
#NEO4J_URI=neo4j://database:7687
#NEO4J_USERNAME=neo4j
#NEO4J_PASSWORD=password
NEO4J_URI=neo4j://database:7687
NEO4J_USERNAME=neo4j
NEO4J_PASSWORD=password

#*****************************************************************
# Langchain
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Available variables:
| NEO4J_URI | neo4j://database:7687 | REQUIRED - URL to Neo4j database |
| NEO4J_USERNAME | neo4j | REQUIRED - Username for Neo4j database |
| NEO4J_PASSWORD | password | REQUIRED - Password for Neo4j database |
| LLM | llama2 | REQUIRED - Can be any Ollama model tag, or gpt-4 or gpt-3.5 or claudev2 |
| LLM | llama3 | REQUIRED - Can be any Ollama model tag, or gpt-4 or gpt-3.5 or claudev2 |
| EMBEDDING_MODEL | sentence_transformer | REQUIRED - Can be sentence_transformer, openai, aws, ollama or google-genai-embedding-001|
| AWS_ACCESS_KEY_ID | | REQUIRED - Only if LLM=claudev2 or embedding_model=aws |
| AWS_SECRET_ACCESS_KEY | | REQUIRED - Only if LLM=claudev2 or embedding_model=aws |
Expand Down
8 changes: 4 additions & 4 deletions running_on_wsl.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@ After the activation enter into the WSL with the command `wsl` and type `docker`
- To list the downloaded model: `ollama list`. This command could lead to:
```sh
NAME ID SIZE MODIFIED
llama2:latest 7da22eda89ac 3.8 GB 22 minutes ago
llama3:latest 7da22eda89ac 3.8 GB 22 minutes ago
```
- (OPTIONAL) To remove model: `ollama rm llama2`
- To run the ollama on WSL: `ollama run llama2`
- (OPTIONAL) To remove model: `ollama rm llama3`
- To run the ollama on WSL: `ollama run llama3`

3. clone the repo
4. cd into the repo and enter wsl
5. run `docker-compose up`

# Run the stack on MAC:

On MAC you can follow this tutorial: https://collabnix.com/getting-started-with-genai-stack-powered-with-docker-langchain-neo4j-and-ollama/
On MAC you can follow this tutorial: https://collabnix.com/getting-started-with-genai-stack-powered-with-docker-langchain-neo4j-and-ollama/