mirror of
https://github.com/rasbt/LLMs-from-scratch.git
synced 2025-08-31 20:08:08 +00:00
minor fixes (#248)
* removed duplicated numpy req * labels to array * autopep8 NBs
This commit is contained in:
parent
4fef19e016
commit
99058c3d07
2
.github/ISSUE_TEMPLATE/ask-a-question.md
vendored
2
.github/ISSUE_TEMPLATE/ask-a-question.md
vendored
@ -2,7 +2,7 @@
|
|||||||
name: Ask a Question
|
name: Ask a Question
|
||||||
about: Ask questions related to the book
|
about: Ask questions related to the book
|
||||||
title: ''
|
title: ''
|
||||||
labels: question
|
labels: [question]
|
||||||
assignees: rasbt
|
assignees: rasbt
|
||||||
|
|
||||||
---
|
---
|
||||||
|
@ -218,6 +218,7 @@
|
|||||||
"import urllib.request\n",
|
"import urllib.request\n",
|
||||||
"import json\n",
|
"import json\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
"\n",
|
||||||
"def query_model(prompt, model=\"llama3\", url=\"http://localhost:11434/api/chat\"):\n",
|
"def query_model(prompt, model=\"llama3\", url=\"http://localhost:11434/api/chat\"):\n",
|
||||||
" # Create the data payload as a dictionary\n",
|
" # Create the data payload as a dictionary\n",
|
||||||
" data = {\n",
|
" data = {\n",
|
||||||
@ -547,6 +548,7 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"from tqdm import tqdm\n",
|
"from tqdm import tqdm\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
"\n",
|
||||||
"def generate_model_scores(json_data, json_key):\n",
|
"def generate_model_scores(json_data, json_key):\n",
|
||||||
" scores = []\n",
|
" scores = []\n",
|
||||||
" for entry in tqdm(json_data, desc=\"Scoring entries\"):\n",
|
" for entry in tqdm(json_data, desc=\"Scoring entries\"):\n",
|
||||||
|
@ -436,6 +436,7 @@
|
|||||||
"source": [
|
"source": [
|
||||||
"from tqdm import tqdm\n",
|
"from tqdm import tqdm\n",
|
||||||
"\n",
|
"\n",
|
||||||
|
"\n",
|
||||||
"def generate_model_scores(json_data, json_key, client):\n",
|
"def generate_model_scores(json_data, json_key, client):\n",
|
||||||
" scores = []\n",
|
" scores = []\n",
|
||||||
" for entry in tqdm(json_data, desc=\"Scoring entries\"):\n",
|
" for entry in tqdm(json_data, desc=\"Scoring entries\"):\n",
|
||||||
|
@ -2,7 +2,6 @@ torch >= 2.0.1 # all
|
|||||||
jupyterlab >= 4.0 # all
|
jupyterlab >= 4.0 # all
|
||||||
tiktoken >= 0.5.1 # ch02; ch04; ch05
|
tiktoken >= 0.5.1 # ch02; ch04; ch05
|
||||||
matplotlib >= 3.7.1 # ch04; ch05
|
matplotlib >= 3.7.1 # ch04; ch05
|
||||||
numpy >= 1.24.3 # ch05
|
|
||||||
tensorflow >= 2.15.0 # ch05
|
tensorflow >= 2.15.0 # ch05
|
||||||
tqdm >= 4.66.1 # ch05; ch07
|
tqdm >= 4.66.1 # ch05; ch07
|
||||||
numpy >= 1.25, < 2.0 # dependency of several other libraries like torch and pandas
|
numpy >= 1.25, < 2.0 # dependency of several other libraries like torch and pandas
|
||||||
|
Loading…
x
Reference in New Issue
Block a user