Open
Conversation
plusbang
reviewed
Dec 8, 2023
| "\n", | ||
| "model_path = snapshot_download(repo_id='meta-llama/Llama-2-7b-chat-hf',\n", | ||
| " token='hf_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') # change it to your own Hugging Face access token" | ||
| " token='hf_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX') # change it to your own Hugging Face access token\n" |
Contributor
There was a problem hiding this comment.
still need a blank space to align
| "### 5.1.2.1 Load Model in Low Precision\n", | ||
| "\n", | ||
| "One common use case is to load a Hugging Face *transformers* model in low precision, i.e. conduct **implicit** quantization while loading.\n", | ||
| " One common use case is to load a Hugging Face *transformers* model in low precision, i.e. conduct **implicit** quantization while loading.\n", |
Contributor
There was a problem hiding this comment.
should we remove 5.1.2.1 Load Model in Low Precision section @shane-huang ? If remove, following section also need to modify.
| "from bigdl.llm.transformers import AutoModelForCausalLM\n", | ||
| "\n", | ||
| "model_in_4bit = AutoModelForCausalLM.from_pretrained(pretrained_model_name_or_path=\"meta-llama/Llama-2-7b-chat-hf\",\n", | ||
| "model_in_4bit = AutoModelForCausalLM.from_pretrained(pretrained_model_name_or_path=\"../chat-7b-hf/\",\n", |
Contributor
There was a problem hiding this comment.
I think we should still use "meta-llama/Llama-2-7b-chat-hf" as a common usage.
| "from transformers import LlamaTokenizer\n", | ||
| "\n", | ||
| "tokenizer = LlamaTokenizer.from_pretrained(pretrained_model_name_or_path=\"meta-llama/Llama-2-7b-chat-hf\")" | ||
| "tokenizer = LlamaTokenizer.from_pretrained(pretrained_model_name_or_path=\"../chat-7b-hf/\")" |
Contributor
There was a problem hiding this comment.
similarly, I think we should still use "meta-llama/Llama-2-7b-chat-hf"
| "metadata": {}, | ||
| "outputs": [ | ||
| { | ||
| "name": "stdout", |
Contributor
There was a problem hiding this comment.
I think we don't need such output here. Maybe we could clear the output.
| ], | ||
| "source": [ | ||
| "SYSTEM_PROMPT = \"You are a helpful, respectful and honest assistant, who always answers as helpfully as possible, while being safe.\"\n", | ||
| "SYSTEM_PROMPT = \"You are a helpful, respectful and honest assistant.\"\n", |
Contributor
There was a problem hiding this comment.
Add the two code blocks here seems a little strange.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update Chapter 5 5_1_ChatBot and 5_1_2_Speech Recognition notebook in the English version and Chinese version