Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ce9f6b6

Browse files
committed
add plan
1 parent 47c0e23 commit ce9f6b6

File tree

3 files changed

+26
-4
lines changed

3 files changed

+26
-4
lines changed

.idea/.gitignore

+5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

02.ChatWithGemma7b /gemmachat.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
# pip install accelerate
21
from transformers import AutoTokenizer, AutoModelForCausalLM
32

43
tokenizer = AutoTokenizer.from_pretrained("google/gemma-7b-it")
5-
model = AutoModelForCausalLM.from_pretrained("google/gemma-7b-it", device_map="auto")
4+
model = AutoModelForCausalLM.from_pretrained("google/gemma-7b-it")
65

76
input_text = "Write me a poem about Machine Learning."
8-
input_ids = tokenizer(input_text, return_tensors="pt").to("cuda")
7+
input_ids = tokenizer(input_text, return_tensors="pt")
98

109
outputs = model.generate(**input_ids)
1110
print(tokenizer.decode(outputs[0]))

README.md

+19-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
11
# FlyPythonLLM
2-
Code of FlyPython Newsletter
2+
3+
Code of [FlyPython Newsletter](https://blog.flypython.com/)
4+
5+
6+
## free content
7+
1. GPTChat
8+
2. ChatWithGemma7b
9+
3. GPTs Action (1)
10+
4. GPTs Action (2)
11+
5. LangChain(1)
12+
6. LangChain(2)
13+
14+
15+
16+
17+
## paid content
18+
1. MoneyPrinter
19+
2. mindgraph
20+
3. metavoice

0 commit comments

Comments
 (0)