Skip to content

Commit

Permalink
Code Llama
Browse files Browse the repository at this point in the history
  • Loading branch information
KillianLucas committed Aug 28, 2023
1 parent 6f4b9ac commit e318329
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions interpreter/llama_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def get_llama_2_instance():
{'URL': 'https://huggingface.co/TheBloke/CodeLlama-13B-oasst-sft-v10-GGUF/blob/main/codellama-13b-oasst-sft-v10.Q4_K_M.gguf', 'Param': '13B', 'Bits': 8, 'Size': '13.83 GB', 'RAM': '16.33 GB', 'Description': 'Original quant method, 8-bit. Almost indistinguishable from float16. High resource use and slow. Not recommended for most users.'}
]

all_models = llama_2_7b + llama_2_13b + code_llama_13b
#all_models = llama_2_7b + llama_2_13b + code_llama_13b
all_models = code_llama_13b


# Function to format the model choice for display
Expand Down Expand Up @@ -101,8 +102,10 @@ def format_choice(model):
return None

# Initialize and return Llama-2
# n_gpu_layers=-1 should use GPU, but frankly I can't tell if it does (Mac OSX)
llama_2 = Llama(model_path=model_path, n_gpu_layers=-1)
# n_gpu_layers=1 should use GPU, but frankly I can't tell if it does (Mac OSX)
llama_2 = Llama(model_path=model_path)

print("Installed llama:", llama_2)

return llama_2

Expand Down

0 comments on commit e318329

Please sign in to comment.