File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,12 @@ COPY lambda_requirements.txt ${LAMBDA_TASK_ROOT}
6
6
# Install the specified packages
7
7
RUN pip install --compile --no-cache-dir -r lambda_requirements.txt
8
8
9
- # Copy model
10
- COPY trained/mini-copilot ${LAMBDA_TASK_ROOT}/trained/mini-copilot
9
+ # Copy old model
10
+ COPY trained/gpt2-728 ${LAMBDA_TASK_ROOT}/trained/gpt2-728
11
11
12
- # Copy tokenizer
13
- COPY trained/mini-copilot-tokenizer ${LAMBDA_TASK_ROOT}/trained/mini-copilot-tokenizer
12
+ # Copy new model and tokenizer
13
+ # COPY trained/mini-copilot ${LAMBDA_TASK_ROOT}/trained/mini-copilot
14
+ # COPY trained/mini-copilot-tokenizer ${LAMBDA_TASK_ROOT}/trained/mini-copilot-tokenizer
14
15
15
16
# Copy function code
16
17
COPY lambda.py ${LAMBDA_TASK_ROOT}
Original file line number Diff line number Diff line change 4
4
from transformers import AutoModelForCausalLM , AutoTokenizer , pipeline
5
5
6
6
device = torch .device ('cuda' if torch .cuda .is_available () else 'cpu' )
7
- tokenizer = AutoTokenizer .from_pretrained (
8
- "trained/mini-copilot-tokenizer/tokenizer_10M" )
9
- model = AutoModelForCausalLM .from_pretrained ("trained/mini-copilot/gpt2-large" )
7
+ tokenizer = AutoTokenizer .from_pretrained ("gpt2" )
8
+ model = AutoModelForCausalLM .from_pretrained ("trained/gpt2-728" )
10
9
model .to (device )
11
10
model .eval ()
12
11
You can’t perform that action at this time.
0 commit comments