bug fix
Browse filesThis view is limited to 50 files because it contains too many changes. Β
See raw diff
- app.py +4 -3
- {hf-dev-train/transformers-main/examples/research_projects/bert-loses-patience/pabee β hf}/__init__.py +0 -0
- hf/__pycache__/__init__.cpython-310.pyc +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.circleci/TROUBLESHOOT.md +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.circleci/config.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.circleci/create_circleci_config.py +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.coveragerc +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.gitattributes +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/ISSUE_TEMPLATE/bug-report.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/ISSUE_TEMPLATE/feature-request.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/ISSUE_TEMPLATE/i18n.md +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/ISSUE_TEMPLATE/migration.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/ISSUE_TEMPLATE/new-model-addition.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/conda/build.sh +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/conda/meta.yaml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/workflows/TROUBLESHOOT.md +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/workflows/add-model-like.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/workflows/build-docker-images.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/workflows/build-past-ci-docker-images.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/workflows/build_documentation.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/workflows/build_pr_documentation.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/workflows/check_runner_status.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/workflows/delete_doc_comment.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/workflows/doctests.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/workflows/model-templates.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/workflows/release-conda.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/workflows/self-nightly-scheduled.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/workflows/self-past-caller.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/workflows/self-past.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/workflows/self-push-caller.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/workflows/self-push.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/workflows/self-scheduled.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/workflows/stale.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/workflows/update_metdata.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.github/workflows/update_tiny_models.yml +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/.gitignore +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/CITATION.cff +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/CODE_OF_CONDUCT.md +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/CONTRIBUTING.md +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/ISSUES.md +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/LICENSE +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/MANIFEST.in +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/Makefile +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/README.md +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/README_es.md +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/README_hd.md +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/README_ja.md +0 -0
- {hf-dev-train/transformers-main β hf/transformers}/README_ko.md +0 -0
app.py
CHANGED
@@ -2,21 +2,22 @@ import os
|
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
import torchaudio
|
5 |
-
from peft import (
|
6 |
LoraConfig,
|
7 |
get_peft_model,
|
8 |
get_peft_model_state_dict,
|
9 |
prepare_model_for_int8_training,
|
10 |
set_peft_model_state_dict,
|
11 |
)
|
12 |
-
from transformers import GenerationConfig
|
|
|
13 |
from utils.prompter import Prompter
|
14 |
import datetime
|
15 |
import time,json
|
16 |
|
17 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
18 |
|
19 |
-
base_model = "
|
20 |
|
21 |
prompter = Prompter('alpaca_short')
|
22 |
tokenizer = LlamaTokenizer.from_pretrained(base_model)
|
|
|
2 |
import gradio as gr
|
3 |
import torch
|
4 |
import torchaudio
|
5 |
+
from peft.src.peft import (
|
6 |
LoraConfig,
|
7 |
get_peft_model,
|
8 |
get_peft_model_state_dict,
|
9 |
prepare_model_for_int8_training,
|
10 |
set_peft_model_state_dict,
|
11 |
)
|
12 |
+
from hf.transformers.src.transformers.generation import GenerationConfig
|
13 |
+
from hf.transformers.src.transformers.models.llama import LlamaForCausalLM, LlamaTokenizer, LlamaConfig
|
14 |
from utils.prompter import Prompter
|
15 |
import datetime
|
16 |
import time,json
|
17 |
|
18 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
19 |
|
20 |
+
base_model = "Llama-2-7b-chat-hf-qformer/"
|
21 |
|
22 |
prompter = Prompter('alpaca_short')
|
23 |
tokenizer = LlamaTokenizer.from_pretrained(base_model)
|
{hf-dev-train/transformers-main/examples/research_projects/bert-loses-patience/pabee β hf}/__init__.py
RENAMED
File without changes
|
hf/__pycache__/__init__.cpython-310.pyc
ADDED
Binary file (122 Bytes). View file
|
|
{hf-dev-train/transformers-main β hf/transformers}/.circleci/TROUBLESHOOT.md
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.circleci/config.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.circleci/create_circleci_config.py
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.coveragerc
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.gitattributes
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/ISSUE_TEMPLATE/bug-report.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/ISSUE_TEMPLATE/config.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/ISSUE_TEMPLATE/feature-request.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/ISSUE_TEMPLATE/i18n.md
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/ISSUE_TEMPLATE/migration.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/ISSUE_TEMPLATE/new-model-addition.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/PULL_REQUEST_TEMPLATE.md
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/conda/build.sh
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/conda/meta.yaml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/workflows/TROUBLESHOOT.md
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/workflows/add-model-like.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/workflows/build-docker-images.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/workflows/build-past-ci-docker-images.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/workflows/build_documentation.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/workflows/build_pr_documentation.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/workflows/check_runner_status.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/workflows/delete_doc_comment.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/workflows/doctests.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/workflows/model-templates.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/workflows/release-conda.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/workflows/self-nightly-scheduled.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/workflows/self-past-caller.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/workflows/self-past.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/workflows/self-push-caller.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/workflows/self-push.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/workflows/self-scheduled.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/workflows/stale.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/workflows/update_metdata.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.github/workflows/update_tiny_models.yml
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/.gitignore
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/CITATION.cff
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/CODE_OF_CONDUCT.md
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/CONTRIBUTING.md
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/ISSUES.md
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/LICENSE
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/MANIFEST.in
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/Makefile
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/README.md
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/README_es.md
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/README_hd.md
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/README_ja.md
RENAMED
File without changes
|
{hf-dev-train/transformers-main β hf/transformers}/README_ko.md
RENAMED
File without changes
|