bolto90 commited on
Commit
5359423
·
1 Parent(s): bfaaf86

DEFAULT_NUM_CTX additions

Browse files

adding further changes for DEFAULT_NUM_CTX, including docs

Files changed (4) hide show
  1. .env.example +2 -1
  2. CONTRIBUTING.md +16 -0
  3. Dockerfile +6 -2
  4. docker-compose.yaml +2 -0
.env.example CHANGED
@@ -62,4 +62,5 @@ VITE_LOG_LEVEL=debug
62
  # DEFAULT_NUM_CTX=32768 # Consumes 36GB of VRAM
63
  # DEFAULT_NUM_CTX=24576 # Consumes 32GB of VRAM
64
  # DEFAULT_NUM_CTX=12288 # Consumes 26GB of VRAM
65
- # DEFAULT_NUM_CTX=6144 # Consumes 24GB of VRAM
 
 
62
  # DEFAULT_NUM_CTX=32768 # Consumes 36GB of VRAM
63
  # DEFAULT_NUM_CTX=24576 # Consumes 32GB of VRAM
64
  # DEFAULT_NUM_CTX=12288 # Consumes 26GB of VRAM
65
+ # DEFAULT_NUM_CTX=6144 # Consumes 24GB of VRAM
66
+ DEFAULT_NUM_CTX=
CONTRIBUTING.md CHANGED
@@ -1,4 +1,7 @@
1
  # Contributing to Bolt.new Fork
 
 
 
2
 
3
  First off, thank you for considering contributing to Bolt.new! This fork aims to expand the capabilities of the original project by integrating multiple LLM providers and enhancing functionality. Every contribution helps make Bolt.new a better tool for developers worldwide.
4
 
@@ -80,6 +83,19 @@ ANTHROPIC_API_KEY=XXX
80
  ```bash
81
  VITE_LOG_LEVEL=debug
82
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  **Important**: Never commit your `.env.local` file to version control. It's already included in .gitignore.
84
 
85
  ### 🚀 Running the Development Server
 
1
  # Contributing to Bolt.new Fork
2
+ ## DEFAULT_NUM_CTX
3
+
4
+ The `DEFAULT_NUM_CTX` environment variable can be used to limit the maximum number of context values used by the qwen2.5-coder model. For example, to limit the context to 24576 values (which uses 32GB of VRAM), set `DEFAULT_NUM_CTX=24576` in your `.env.local` file.
5
 
6
  First off, thank you for considering contributing to Bolt.new! This fork aims to expand the capabilities of the original project by integrating multiple LLM providers and enhancing functionality. Every contribution helps make Bolt.new a better tool for developers worldwide.
7
 
 
83
  ```bash
84
  VITE_LOG_LEVEL=debug
85
  ```
86
+
87
+ - Optionally set context size:
88
+ ```bash
89
+ DEFAULT_NUM_CTX=32768
90
+ ```
91
+
92
+ Some Example Context Values for the qwen2.5-coder:32b models are.
93
+
94
+ * DEFAULT_NUM_CTX=32768 - Consumes 36GB of VRAM
95
+ * DEFAULT_NUM_CTX=24576 - Consumes 32GB of VRAM
96
+ * DEFAULT_NUM_CTX=12288 - Consumes 26GB of VRAM
97
+ * DEFAULT_NUM_CTX=6144 - Consumes 24GB of VRAM
98
+
99
  **Important**: Never commit your `.env.local` file to version control. It's already included in .gitignore.
100
 
101
  ### 🚀 Running the Development Server
Dockerfile CHANGED
@@ -25,6 +25,7 @@ ARG OPEN_ROUTER_API_KEY
25
  ARG GOOGLE_GENERATIVE_AI_API_KEY
26
  ARG OLLAMA_API_BASE_URL
27
  ARG VITE_LOG_LEVEL=debug
 
28
 
29
  ENV WRANGLER_SEND_METRICS=false \
30
  GROQ_API_KEY=${GROQ_API_KEY} \
@@ -33,7 +34,8 @@ ENV WRANGLER_SEND_METRICS=false \
33
  OPEN_ROUTER_API_KEY=${OPEN_ROUTER_API_KEY} \
34
  GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY} \
35
  OLLAMA_API_BASE_URL=${OLLAMA_API_BASE_URL} \
36
- VITE_LOG_LEVEL=${VITE_LOG_LEVEL}
 
37
 
38
  # Pre-configure wrangler to disable metrics
39
  RUN mkdir -p /root/.config/.wrangler && \
@@ -54,6 +56,7 @@ ARG OPEN_ROUTER_API_KEY
54
  ARG GOOGLE_GENERATIVE_AI_API_KEY
55
  ARG OLLAMA_API_BASE_URL
56
  ARG VITE_LOG_LEVEL=debug
 
57
 
58
  ENV GROQ_API_KEY=${GROQ_API_KEY} \
59
  OPENAI_API_KEY=${OPENAI_API_KEY} \
@@ -61,7 +64,8 @@ ENV GROQ_API_KEY=${GROQ_API_KEY} \
61
  OPEN_ROUTER_API_KEY=${OPEN_ROUTER_API_KEY} \
62
  GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY} \
63
  OLLAMA_API_BASE_URL=${OLLAMA_API_BASE_URL} \
64
- VITE_LOG_LEVEL=${VITE_LOG_LEVEL}
 
65
 
66
  RUN mkdir -p ${WORKDIR}/run
67
  CMD pnpm run dev --host
 
25
  ARG GOOGLE_GENERATIVE_AI_API_KEY
26
  ARG OLLAMA_API_BASE_URL
27
  ARG VITE_LOG_LEVEL=debug
28
+ ARG DEFAULT_NUM_CTX
29
 
30
  ENV WRANGLER_SEND_METRICS=false \
31
  GROQ_API_KEY=${GROQ_API_KEY} \
 
34
  OPEN_ROUTER_API_KEY=${OPEN_ROUTER_API_KEY} \
35
  GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY} \
36
  OLLAMA_API_BASE_URL=${OLLAMA_API_BASE_URL} \
37
+ VITE_LOG_LEVEL=${VITE_LOG_LEVEL} \
38
+ DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX}
39
 
40
  # Pre-configure wrangler to disable metrics
41
  RUN mkdir -p /root/.config/.wrangler && \
 
56
  ARG GOOGLE_GENERATIVE_AI_API_KEY
57
  ARG OLLAMA_API_BASE_URL
58
  ARG VITE_LOG_LEVEL=debug
59
+ ARG DEFAULT_NUM_CTX
60
 
61
  ENV GROQ_API_KEY=${GROQ_API_KEY} \
62
  OPENAI_API_KEY=${OPENAI_API_KEY} \
 
64
  OPEN_ROUTER_API_KEY=${OPEN_ROUTER_API_KEY} \
65
  GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY} \
66
  OLLAMA_API_BASE_URL=${OLLAMA_API_BASE_URL} \
67
+ VITE_LOG_LEVEL=${VITE_LOG_LEVEL} \
68
+ DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX}
69
 
70
  RUN mkdir -p ${WORKDIR}/run
71
  CMD pnpm run dev --host
docker-compose.yaml CHANGED
@@ -20,6 +20,7 @@ services:
20
  - GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY}
21
  - OLLAMA_API_BASE_URL=${OLLAMA_API_BASE_URL}
22
  - VITE_LOG_LEVEL=${VITE_LOG_LEVEL:-debug}
 
23
  - RUNNING_IN_DOCKER=true
24
  extra_hosts:
25
  - "host.docker.internal:host-gateway"
@@ -46,6 +47,7 @@ services:
46
  - GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY}
47
  - OLLAMA_API_BASE_URL=${OLLAMA_API_BASE_URL}
48
  - VITE_LOG_LEVEL=${VITE_LOG_LEVEL:-debug}
 
49
  - RUNNING_IN_DOCKER=true
50
  extra_hosts:
51
  - "host.docker.internal:host-gateway"
 
20
  - GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY}
21
  - OLLAMA_API_BASE_URL=${OLLAMA_API_BASE_URL}
22
  - VITE_LOG_LEVEL=${VITE_LOG_LEVEL:-debug}
23
+ - DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX:-32768}
24
  - RUNNING_IN_DOCKER=true
25
  extra_hosts:
26
  - "host.docker.internal:host-gateway"
 
47
  - GOOGLE_GENERATIVE_AI_API_KEY=${GOOGLE_GENERATIVE_AI_API_KEY}
48
  - OLLAMA_API_BASE_URL=${OLLAMA_API_BASE_URL}
49
  - VITE_LOG_LEVEL=${VITE_LOG_LEVEL:-debug}
50
+ - DEFAULT_NUM_CTX=${DEFAULT_NUM_CTX:-32768}
51
  - RUNNING_IN_DOCKER=true
52
  extra_hosts:
53
  - "host.docker.internal:host-gateway"