Spaces:
sonalkum
/
Running on Zero

sonalkum commited on
Commit
fa57c60
β€’
1 Parent(s): 07971bd
This view is limited to 50 files because it contains too many changes. Β  See raw diff
Files changed (50) hide show
  1. app.py +4 -3
  2. {hf-dev-train/transformers-main/examples/research_projects/bert-loses-patience/pabee β†’ hf}/__init__.py +0 -0
  3. hf/__pycache__/__init__.cpython-310.pyc +0 -0
  4. {hf-dev-train/transformers-main β†’ hf/transformers}/.circleci/TROUBLESHOOT.md +0 -0
  5. {hf-dev-train/transformers-main β†’ hf/transformers}/.circleci/config.yml +0 -0
  6. {hf-dev-train/transformers-main β†’ hf/transformers}/.circleci/create_circleci_config.py +0 -0
  7. {hf-dev-train/transformers-main β†’ hf/transformers}/.coveragerc +0 -0
  8. {hf-dev-train/transformers-main β†’ hf/transformers}/.gitattributes +0 -0
  9. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/ISSUE_TEMPLATE/bug-report.yml +0 -0
  10. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  11. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/ISSUE_TEMPLATE/feature-request.yml +0 -0
  12. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/ISSUE_TEMPLATE/i18n.md +0 -0
  13. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/ISSUE_TEMPLATE/migration.yml +0 -0
  14. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/ISSUE_TEMPLATE/new-model-addition.yml +0 -0
  15. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  16. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/conda/build.sh +0 -0
  17. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/conda/meta.yaml +0 -0
  18. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/workflows/TROUBLESHOOT.md +0 -0
  19. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/workflows/add-model-like.yml +0 -0
  20. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/workflows/build-docker-images.yml +0 -0
  21. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/workflows/build-past-ci-docker-images.yml +0 -0
  22. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/workflows/build_documentation.yml +0 -0
  23. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/workflows/build_pr_documentation.yml +0 -0
  24. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/workflows/check_runner_status.yml +0 -0
  25. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/workflows/delete_doc_comment.yml +0 -0
  26. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/workflows/doctests.yml +0 -0
  27. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/workflows/model-templates.yml +0 -0
  28. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/workflows/release-conda.yml +0 -0
  29. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/workflows/self-nightly-scheduled.yml +0 -0
  30. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/workflows/self-past-caller.yml +0 -0
  31. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/workflows/self-past.yml +0 -0
  32. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/workflows/self-push-caller.yml +0 -0
  33. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/workflows/self-push.yml +0 -0
  34. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/workflows/self-scheduled.yml +0 -0
  35. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/workflows/stale.yml +0 -0
  36. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/workflows/update_metdata.yml +0 -0
  37. {hf-dev-train/transformers-main β†’ hf/transformers}/.github/workflows/update_tiny_models.yml +0 -0
  38. {hf-dev-train/transformers-main β†’ hf/transformers}/.gitignore +0 -0
  39. {hf-dev-train/transformers-main β†’ hf/transformers}/CITATION.cff +0 -0
  40. {hf-dev-train/transformers-main β†’ hf/transformers}/CODE_OF_CONDUCT.md +0 -0
  41. {hf-dev-train/transformers-main β†’ hf/transformers}/CONTRIBUTING.md +0 -0
  42. {hf-dev-train/transformers-main β†’ hf/transformers}/ISSUES.md +0 -0
  43. {hf-dev-train/transformers-main β†’ hf/transformers}/LICENSE +0 -0
  44. {hf-dev-train/transformers-main β†’ hf/transformers}/MANIFEST.in +0 -0
  45. {hf-dev-train/transformers-main β†’ hf/transformers}/Makefile +0 -0
  46. {hf-dev-train/transformers-main β†’ hf/transformers}/README.md +0 -0
  47. {hf-dev-train/transformers-main β†’ hf/transformers}/README_es.md +0 -0
  48. {hf-dev-train/transformers-main β†’ hf/transformers}/README_hd.md +0 -0
  49. {hf-dev-train/transformers-main β†’ hf/transformers}/README_ja.md +0 -0
  50. {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, LlamaForCausalLM, LlamaTokenizer, LlamaConfig
 
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 = "./Llama-2-7b-chat-hf-qformer/"
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