Розмір відео: 1280 X 720853 X 480640 X 360
Показувати елементи керування програвачем
Автоматичне відтворення
Автоповтор
from gpt4all import GPT4AllLOCAL_MODEL_PATH = "C:\\Users\\winnie_the_pooh\\.cache\\gpt4all\\"model = GPT4All( model_name="Meta-Llama-3-8B-Instruct.Q4_0", model_path=LOCAL_MODEL_PATH, device="cuda", n_threads=8, allow_download=False, verbose=True)def generate_local(task): print("Generating content locally") response = model.generate( prompt=f"{task}", max_tokens=2000 ) return responseprompt = "Say Hi!"output = generate_local(prompt)output_file = "prompt_and_output.md"with open(output_file, "a", encoding="utf-8") as file: file.write("# 📝 Prompt:") file.write(f"{prompt}") file.write("---") file.write("## 💬 Response:") file.write(output) file.write("---")print("" + "=" * 40)print(" 📝 Prompt:")print(f"{prompt}")print("" + "=" * 40)print(" 💬 Response:")print(output)print("" + "=" * 40)
FRY YOUR PC!! FRY YOUR ELECTRICAL BILL!! FRY THE ELECTRICITY GRID!!
@jamesperalta35 lol I can define a function now 🤓
lol they’re building nuclear power plants for this 😂
They need to build it in Alberta! Dawson Creek!!
from gpt4all import GPT4All
LOCAL_MODEL_PATH = "C:\\Users\\winnie_the_pooh\\.cache\\gpt4all\\"
model = GPT4All(
model_name="Meta-Llama-3-8B-Instruct.Q4_0",
model_path=LOCAL_MODEL_PATH,
device="cuda",
n_threads=8,
allow_download=False,
verbose=True
)
def generate_local(task):
print("
Generating content locally")
response = model.generate(
prompt=f"{task}",
max_tokens=2000
)
return response
prompt = "Say Hi!"
output = generate_local(prompt)
output_file = "prompt_and_output.md"
with open(output_file, "a", encoding="utf-8") as file:
file.write("# 📝 Prompt:
")
file.write(f"{prompt}
")
file.write("---
")
file.write("## 💬 Response:
")
file.write(output)
file.write("
---
")
print("
" + "=" * 40)
print(" 📝 Prompt:
")
print(f"{prompt}")
print("
" + "=" * 40)
print(" 💬 Response:
")
print(output)
print("
" + "=" * 40)
FRY YOUR PC!! FRY YOUR ELECTRICAL BILL!! FRY THE ELECTRICITY GRID!!
@jamesperalta35 lol I can define a function now 🤓
lol they’re building nuclear power plants for this 😂
They need to build it in Alberta! Dawson Creek!!