Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to generate Bible data to LLAMA? #18

Open
paulocoutinhox opened this issue Mar 15, 2023 · 4 comments
Open

How to generate Bible data to LLAMA? #18

paulocoutinhox opened this issue Mar 15, 2023 · 4 comments

Comments

@paulocoutinhox
Copy link

Hi,

To a more real scenario, if i want input all the bible text into the LLAMA, how can i reach it?

Example of bible data:
https://raw.githubusercontent.com/tushortz/variety-bible-text/master/bibles/kjv.txt

Thanks.

@randaller
Copy link
Owner

randaller commented Mar 19, 2023

Hi @paulocoutinhox!

We may train HF version with Bible data:

  • prepare datasets/bible.csv file from provided kjv.txt file, according to another /datasets examples
text
In the beginning God created the heaven and the earth. -- genesis 1:1
And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of God moved upon the face of the waters. -- genesis 1:2
And God said, Let there be light: and there was light. -- genesis 1:3
And God saw the light, that it was good: and God divided the light from the darkness. -- genesis 1:4
...

modify hf-training-example.py

MODEL = 'decapoda-research/llama-7b-hf'
DATA_FILE_PATH = 'datasets/bible.csv'
OUTPUT_DIR = './trained'

run training

python hf-training-example.py

After such a long training time, I hope, LLaMA model probably will be able to supply us with a new AI commandments.

The prompt in hf-inference-example.py may be: "And "

@paulocoutinhox
Copy link
Author

This is my other question, is this algorithm just for inference or can I use it for gpt chat style Bible questions?

@randaller
Copy link
Owner

randaller commented Mar 19, 2023

@paulocoutinhox chat is just an imitation of chat, really both are just inference, chat is just when 2048 last tokens of dialogue with LLaMA has been passed as prompt for further inference. You may ask questions to LLaMA using just prompt easily. I'll try to add HF chat example soon.

@randaller
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants