Upload folder using huggingface_hub
Browse files- README.md +57 -0
- config.json +40 -0
- generation_config.json +6 -0
- openvino_model.bin +3 -0
- openvino_model.xml +0 -0
- special_tokens_map.json +22 -0
- tokenizer.json +0 -0
- tokenizer_config.json +118 -0
    	
        README.md
    ADDED
    
    | @@ -0,0 +1,57 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            license: apache-2.0
         | 
| 3 | 
            +
            license_link: https://choosealicense.com/licenses/apache-2.0/
         | 
| 4 | 
            +
            ---
         | 
| 5 | 
            +
            # falcon-7b-instruct-fp16-ov
         | 
| 6 | 
            +
            * Model creator: [Tiiuae](https://huggingface.co/tiiuae)
         | 
| 7 | 
            +
             * Original model: [falcon-7b-instruct](https://huggingface.co/tiiuae/falcon-7b-instruct)
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            ## Description
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            This is [falcon-7b-instruct](https://huggingface.co/tiiuae/falcon-7b-instruct) model converted to the [OpenVINO™ IR](https://docs.openvino.ai/2024/documentation/openvino-ir-format.html) (Intermediate Representation) format.
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            ## Compatibility
         | 
| 14 | 
            +
             | 
| 15 | 
            +
            The provided OpenVINO™ IR model is compatible with:
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            * OpenVINO version 2024.1.0 and higher
         | 
| 18 | 
            +
            * Optimum Intel 1.16.0 and higher
         | 
| 19 | 
            +
             | 
| 20 | 
            +
            ## Running Model Inference
         | 
| 21 | 
            +
             | 
| 22 | 
            +
            1. Install packages required for using [Optimum Intel](https://huggingface.co/docs/optimum/intel/index) integration with the OpenVINO backend:
         | 
| 23 | 
            +
             | 
| 24 | 
            +
            ```
         | 
| 25 | 
            +
            pip install optimum[openvino]
         | 
| 26 | 
            +
            ```
         | 
| 27 | 
            +
             | 
| 28 | 
            +
            2. Run model inference:
         | 
| 29 | 
            +
             | 
| 30 | 
            +
            ```
         | 
| 31 | 
            +
            from transformers import AutoTokenizer
         | 
| 32 | 
            +
            from optimum.intel.openvino import OVModelForCausalLM
         | 
| 33 | 
            +
             | 
| 34 | 
            +
            model_id = "OpenVINO/falcon-7b-instruct-fp16-ov"
         | 
| 35 | 
            +
            tokenizer = AutoTokenizer.from_pretrained(model_id)
         | 
| 36 | 
            +
            model = OVModelForCausalLM.from_pretrained(model_id)
         | 
| 37 | 
            +
             | 
| 38 | 
            +
            inputs = tokenizer("What is OpenVINO?", return_tensors="pt")
         | 
| 39 | 
            +
             | 
| 40 | 
            +
            outputs = model.generate(**inputs, max_length=200)
         | 
| 41 | 
            +
            text = tokenizer.batch_decode(outputs)[0]
         | 
| 42 | 
            +
            print(text)
         | 
| 43 | 
            +
            ```
         | 
| 44 | 
            +
             | 
| 45 | 
            +
            For more examples and possible optimizations, refer to the [OpenVINO Large Language Model Inference Guide](https://docs.openvino.ai/2024/learn-openvino/llm_inference_guide.html).
         | 
| 46 | 
            +
             | 
| 47 | 
            +
            ## Limitations
         | 
| 48 | 
            +
             | 
| 49 | 
            +
            Check the original model card for [limitations]().
         | 
| 50 | 
            +
             | 
| 51 | 
            +
            ## Legal information
         | 
| 52 | 
            +
             | 
| 53 | 
            +
            The original model is distributed under [apache-2.0](https://choosealicense.com/licenses/apache-2.0/) license. More details can be found in [original model card](https://huggingface.co/tiiuae/falcon-7b-instruct).
         | 
| 54 | 
            +
             | 
| 55 | 
            +
            ## Disclaimer
         | 
| 56 | 
            +
             | 
| 57 | 
            +
            Intel is committed to respecting human rights and avoiding causing or contributing to adverse impacts on human rights. See [Intel’s Global Human Rights Principles](https://www.intel.com/content/dam/www/central-libraries/us/en/documents/policy-human-rights.pdf). Intel’s products and software are intended only to be used in applications that do not cause or contribute to adverse impacts on human rights.
         | 
    	
        config.json
    ADDED
    
    | @@ -0,0 +1,40 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            {
         | 
| 2 | 
            +
              "_name_or_path": "tiiuae/falcon-7b-instruct",
         | 
| 3 | 
            +
              "activation": "gelu",
         | 
| 4 | 
            +
              "alibi": false,
         | 
| 5 | 
            +
              "apply_residual_connection_post_layernorm": false,
         | 
| 6 | 
            +
              "architectures": [
         | 
| 7 | 
            +
                "FalconForCausalLM"
         | 
| 8 | 
            +
              ],
         | 
| 9 | 
            +
              "attention_dropout": 0.0,
         | 
| 10 | 
            +
              "auto_map": {
         | 
| 11 | 
            +
                "AutoConfig": "configuration_falcon.FalconConfig",
         | 
| 12 | 
            +
                "AutoModel": "modeling_falcon.FalconModel",
         | 
| 13 | 
            +
                "AutoModelForCausalLM": "modeling_falcon.FalconForCausalLM",
         | 
| 14 | 
            +
                "AutoModelForQuestionAnswering": "modeling_falcon.FalconForQuestionAnswering",
         | 
| 15 | 
            +
                "AutoModelForSequenceClassification": "modeling_falcon.FalconForSequenceClassification",
         | 
| 16 | 
            +
                "AutoModelForTokenClassification": "modeling_falcon.FalconForTokenClassification"
         | 
| 17 | 
            +
              },
         | 
| 18 | 
            +
              "bias": false,
         | 
| 19 | 
            +
              "bos_token_id": 11,
         | 
| 20 | 
            +
              "eos_token_id": 11,
         | 
| 21 | 
            +
              "ffn_hidden_size": 18176,
         | 
| 22 | 
            +
              "hidden_dropout": 0.0,
         | 
| 23 | 
            +
              "hidden_size": 4544,
         | 
| 24 | 
            +
              "initializer_range": 0.02,
         | 
| 25 | 
            +
              "layer_norm_epsilon": 1e-05,
         | 
| 26 | 
            +
              "max_position_embeddings": 2048,
         | 
| 27 | 
            +
              "model_type": "falcon",
         | 
| 28 | 
            +
              "multi_query": true,
         | 
| 29 | 
            +
              "new_decoder_architecture": false,
         | 
| 30 | 
            +
              "num_attention_heads": 71,
         | 
| 31 | 
            +
              "num_hidden_layers": 32,
         | 
| 32 | 
            +
              "num_kv_heads": 71,
         | 
| 33 | 
            +
              "num_ln_in_parallel_attn": null,
         | 
| 34 | 
            +
              "parallel_attn": true,
         | 
| 35 | 
            +
              "rope_scaling": null,
         | 
| 36 | 
            +
              "rope_theta": 10000.0,
         | 
| 37 | 
            +
              "transformers_version": "4.41.2",
         | 
| 38 | 
            +
              "use_cache": true,
         | 
| 39 | 
            +
              "vocab_size": 65024
         | 
| 40 | 
            +
            }
         | 
    	
        generation_config.json
    ADDED
    
    | @@ -0,0 +1,6 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            {
         | 
| 2 | 
            +
              "_from_model_config": true,
         | 
| 3 | 
            +
              "bos_token_id": 1,
         | 
| 4 | 
            +
              "eos_token_id": 2,
         | 
| 5 | 
            +
              "transformers_version": "4.41.2"
         | 
| 6 | 
            +
            }
         | 
    	
        openvino_model.bin
    ADDED
    
    | @@ -0,0 +1,3 @@ | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            version https://git-lfs.github.com/spec/v1
         | 
| 2 | 
            +
            oid sha256:7d33f83651cd0e956004f21a445242b6d4db385b220dcc47030fc4090003a466
         | 
| 3 | 
            +
            size 13843966158
         | 
    	
        openvino_model.xml
    ADDED
    
    | The diff for this file is too large to render. 
		See raw diff | 
|  | 
    	
        special_tokens_map.json
    ADDED
    
    | @@ -0,0 +1,22 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            {
         | 
| 2 | 
            +
              "additional_special_tokens": [
         | 
| 3 | 
            +
                ">>TITLE<<",
         | 
| 4 | 
            +
                ">>ABSTRACT<<",
         | 
| 5 | 
            +
                ">>INTRODUCTION<<",
         | 
| 6 | 
            +
                ">>SUMMARY<<",
         | 
| 7 | 
            +
                ">>COMMENT<<",
         | 
| 8 | 
            +
                ">>ANSWER<<",
         | 
| 9 | 
            +
                ">>QUESTION<<",
         | 
| 10 | 
            +
                ">>DOMAIN<<",
         | 
| 11 | 
            +
                ">>PREFIX<<",
         | 
| 12 | 
            +
                ">>SUFFIX<<",
         | 
| 13 | 
            +
                ">>MIDDLE<<"
         | 
| 14 | 
            +
              ],
         | 
| 15 | 
            +
              "eos_token": {
         | 
| 16 | 
            +
                "content": "<|endoftext|>",
         | 
| 17 | 
            +
                "lstrip": false,
         | 
| 18 | 
            +
                "normalized": false,
         | 
| 19 | 
            +
                "rstrip": false,
         | 
| 20 | 
            +
                "single_word": false
         | 
| 21 | 
            +
              }
         | 
| 22 | 
            +
            }
         | 
    	
        tokenizer.json
    ADDED
    
    | The diff for this file is too large to render. 
		See raw diff | 
|  | 
    	
        tokenizer_config.json
    ADDED
    
    | @@ -0,0 +1,118 @@ | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
|  | 
|  | |
| 1 | 
            +
            {
         | 
| 2 | 
            +
              "add_prefix_space": false,
         | 
| 3 | 
            +
              "added_tokens_decoder": {
         | 
| 4 | 
            +
                "0": {
         | 
| 5 | 
            +
                  "content": ">>TITLE<<",
         | 
| 6 | 
            +
                  "lstrip": false,
         | 
| 7 | 
            +
                  "normalized": false,
         | 
| 8 | 
            +
                  "rstrip": false,
         | 
| 9 | 
            +
                  "single_word": false,
         | 
| 10 | 
            +
                  "special": true
         | 
| 11 | 
            +
                },
         | 
| 12 | 
            +
                "1": {
         | 
| 13 | 
            +
                  "content": ">>ABSTRACT<<",
         | 
| 14 | 
            +
                  "lstrip": false,
         | 
| 15 | 
            +
                  "normalized": false,
         | 
| 16 | 
            +
                  "rstrip": false,
         | 
| 17 | 
            +
                  "single_word": false,
         | 
| 18 | 
            +
                  "special": true
         | 
| 19 | 
            +
                },
         | 
| 20 | 
            +
                "2": {
         | 
| 21 | 
            +
                  "content": ">>INTRODUCTION<<",
         | 
| 22 | 
            +
                  "lstrip": false,
         | 
| 23 | 
            +
                  "normalized": false,
         | 
| 24 | 
            +
                  "rstrip": false,
         | 
| 25 | 
            +
                  "single_word": false,
         | 
| 26 | 
            +
                  "special": true
         | 
| 27 | 
            +
                },
         | 
| 28 | 
            +
                "3": {
         | 
| 29 | 
            +
                  "content": ">>SUMMARY<<",
         | 
| 30 | 
            +
                  "lstrip": false,
         | 
| 31 | 
            +
                  "normalized": false,
         | 
| 32 | 
            +
                  "rstrip": false,
         | 
| 33 | 
            +
                  "single_word": false,
         | 
| 34 | 
            +
                  "special": true
         | 
| 35 | 
            +
                },
         | 
| 36 | 
            +
                "4": {
         | 
| 37 | 
            +
                  "content": ">>COMMENT<<",
         | 
| 38 | 
            +
                  "lstrip": false,
         | 
| 39 | 
            +
                  "normalized": false,
         | 
| 40 | 
            +
                  "rstrip": false,
         | 
| 41 | 
            +
                  "single_word": false,
         | 
| 42 | 
            +
                  "special": true
         | 
| 43 | 
            +
                },
         | 
| 44 | 
            +
                "5": {
         | 
| 45 | 
            +
                  "content": ">>ANSWER<<",
         | 
| 46 | 
            +
                  "lstrip": false,
         | 
| 47 | 
            +
                  "normalized": false,
         | 
| 48 | 
            +
                  "rstrip": false,
         | 
| 49 | 
            +
                  "single_word": false,
         | 
| 50 | 
            +
                  "special": true
         | 
| 51 | 
            +
                },
         | 
| 52 | 
            +
                "6": {
         | 
| 53 | 
            +
                  "content": ">>QUESTION<<",
         | 
| 54 | 
            +
                  "lstrip": false,
         | 
| 55 | 
            +
                  "normalized": false,
         | 
| 56 | 
            +
                  "rstrip": false,
         | 
| 57 | 
            +
                  "single_word": false,
         | 
| 58 | 
            +
                  "special": true
         | 
| 59 | 
            +
                },
         | 
| 60 | 
            +
                "7": {
         | 
| 61 | 
            +
                  "content": ">>DOMAIN<<",
         | 
| 62 | 
            +
                  "lstrip": false,
         | 
| 63 | 
            +
                  "normalized": false,
         | 
| 64 | 
            +
                  "rstrip": false,
         | 
| 65 | 
            +
                  "single_word": false,
         | 
| 66 | 
            +
                  "special": true
         | 
| 67 | 
            +
                },
         | 
| 68 | 
            +
                "8": {
         | 
| 69 | 
            +
                  "content": ">>PREFIX<<",
         | 
| 70 | 
            +
                  "lstrip": false,
         | 
| 71 | 
            +
                  "normalized": false,
         | 
| 72 | 
            +
                  "rstrip": false,
         | 
| 73 | 
            +
                  "single_word": false,
         | 
| 74 | 
            +
                  "special": true
         | 
| 75 | 
            +
                },
         | 
| 76 | 
            +
                "9": {
         | 
| 77 | 
            +
                  "content": ">>SUFFIX<<",
         | 
| 78 | 
            +
                  "lstrip": false,
         | 
| 79 | 
            +
                  "normalized": false,
         | 
| 80 | 
            +
                  "rstrip": false,
         | 
| 81 | 
            +
                  "single_word": false,
         | 
| 82 | 
            +
                  "special": true
         | 
| 83 | 
            +
                },
         | 
| 84 | 
            +
                "10": {
         | 
| 85 | 
            +
                  "content": ">>MIDDLE<<",
         | 
| 86 | 
            +
                  "lstrip": false,
         | 
| 87 | 
            +
                  "normalized": false,
         | 
| 88 | 
            +
                  "rstrip": false,
         | 
| 89 | 
            +
                  "single_word": false,
         | 
| 90 | 
            +
                  "special": true
         | 
| 91 | 
            +
                },
         | 
| 92 | 
            +
                "11": {
         | 
| 93 | 
            +
                  "content": "<|endoftext|>",
         | 
| 94 | 
            +
                  "lstrip": false,
         | 
| 95 | 
            +
                  "normalized": false,
         | 
| 96 | 
            +
                  "rstrip": false,
         | 
| 97 | 
            +
                  "single_word": false,
         | 
| 98 | 
            +
                  "special": true
         | 
| 99 | 
            +
                }
         | 
| 100 | 
            +
              },
         | 
| 101 | 
            +
              "additional_special_tokens": [
         | 
| 102 | 
            +
                ">>TITLE<<",
         | 
| 103 | 
            +
                ">>ABSTRACT<<",
         | 
| 104 | 
            +
                ">>INTRODUCTION<<",
         | 
| 105 | 
            +
                ">>SUMMARY<<",
         | 
| 106 | 
            +
                ">>COMMENT<<",
         | 
| 107 | 
            +
                ">>ANSWER<<",
         | 
| 108 | 
            +
                ">>QUESTION<<",
         | 
| 109 | 
            +
                ">>DOMAIN<<",
         | 
| 110 | 
            +
                ">>PREFIX<<",
         | 
| 111 | 
            +
                ">>SUFFIX<<",
         | 
| 112 | 
            +
                ">>MIDDLE<<"
         | 
| 113 | 
            +
              ],
         | 
| 114 | 
            +
              "clean_up_tokenization_spaces": true,
         | 
| 115 | 
            +
              "eos_token": "<|endoftext|>",
         | 
| 116 | 
            +
              "model_max_length": 2048,
         | 
| 117 | 
            +
              "tokenizer_class": "PreTrainedTokenizerFast"
         | 
| 118 | 
            +
            }
         | 
