Upload folder using huggingface_hub
Browse files- README.md +73 -0
- config.json +29 -0
- model.safetensors +3 -0
- quantize_config.json +11 -0
- special_tokens_map.json +30 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +42 -0
README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
tags:
|
| 4 |
+
- finetuned
|
| 5 |
+
- quantized
|
| 6 |
+
- 4-bit
|
| 7 |
+
- gptq
|
| 8 |
+
- transformers
|
| 9 |
+
- safetensors
|
| 10 |
+
- llama
|
| 11 |
+
- text-generation
|
| 12 |
+
- en
|
| 13 |
+
- license:mit
|
| 14 |
+
- model-index
|
| 15 |
+
- autotrain_compatible
|
| 16 |
+
- endpoints_compatible
|
| 17 |
+
- has_space
|
| 18 |
+
- text-generation-inference
|
| 19 |
+
- region:us
|
| 20 |
+
model_name: miqu-1-70b-sf-GPTQ
|
| 21 |
+
base_model: 152334H/miqu-1-70b-sf
|
| 22 |
+
inference: false
|
| 23 |
+
model_creator: 152334H
|
| 24 |
+
pipeline_tag: text-generation
|
| 25 |
+
quantized_by: MaziyarPanahi
|
| 26 |
+
---
|
| 27 |
+
# Description
|
| 28 |
+
[MaziyarPanahi/miqu-1-70b-sf-GPTQ](https://huggingface.co/MaziyarPanahi/miqu-1-70b-sf-GPTQ) is a quantized (GPTQ) version of [152334H/miqu-1-70b-sf](https://huggingface.co/152334H/miqu-1-70b-sf)
|
| 29 |
+
|
| 30 |
+
## How to use
|
| 31 |
+
### Install the necessary packages
|
| 32 |
+
|
| 33 |
+
```
|
| 34 |
+
pip install --upgrade accelerate auto-gptq transformers
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
### Example Python code
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
```python
|
| 41 |
+
from transformers import AutoTokenizer, pipeline
|
| 42 |
+
from auto_gptq import AutoGPTQForCausalLM, BaseQuantizeConfig
|
| 43 |
+
import torch
|
| 44 |
+
|
| 45 |
+
model_id = "MaziyarPanahi/miqu-1-70b-sf-GPTQ"
|
| 46 |
+
|
| 47 |
+
quantize_config = BaseQuantizeConfig(
|
| 48 |
+
bits=4,
|
| 49 |
+
group_size=128,
|
| 50 |
+
desc_act=False
|
| 51 |
+
)
|
| 52 |
+
|
| 53 |
+
model = AutoGPTQForCausalLM.from_quantized(
|
| 54 |
+
model_id,
|
| 55 |
+
use_safetensors=True,
|
| 56 |
+
device="cuda:0",
|
| 57 |
+
quantize_config=quantize_config)
|
| 58 |
+
|
| 59 |
+
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 60 |
+
|
| 61 |
+
pipe = pipeline(
|
| 62 |
+
"text-generation",
|
| 63 |
+
model=model,
|
| 64 |
+
tokenizer=tokenizer,
|
| 65 |
+
max_new_tokens=512,
|
| 66 |
+
temperature=0.7,
|
| 67 |
+
top_p=0.95,
|
| 68 |
+
repetition_penalty=1.1
|
| 69 |
+
)
|
| 70 |
+
|
| 71 |
+
outputs = pipe("What is a large language model?")
|
| 72 |
+
print(outputs[0]["generated_text"])
|
| 73 |
+
```
|
config.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "152334H/miqu-1-70b-sf",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"LlamaForCausalLM"
|
| 5 |
+
],
|
| 6 |
+
"attention_bias": false,
|
| 7 |
+
"attention_dropout": 0.0,
|
| 8 |
+
"bos_token_id": 1,
|
| 9 |
+
"eos_token_id": 2,
|
| 10 |
+
"hidden_act": "silu",
|
| 11 |
+
"hidden_size": 8192,
|
| 12 |
+
"initializer_range": 0.02,
|
| 13 |
+
"intermediate_size": 28672,
|
| 14 |
+
"max_position_embeddings": 32764,
|
| 15 |
+
"model_type": "llama",
|
| 16 |
+
"num_attention_heads": 64,
|
| 17 |
+
"num_hidden_layers": 80,
|
| 18 |
+
"num_key_value_heads": 8,
|
| 19 |
+
"pad_token_id": 0,
|
| 20 |
+
"pretraining_tp": 1,
|
| 21 |
+
"rms_norm_eps": 1e-05,
|
| 22 |
+
"rope_scaling": null,
|
| 23 |
+
"rope_theta": 1000000,
|
| 24 |
+
"tie_word_embeddings": false,
|
| 25 |
+
"torch_dtype": "float16",
|
| 26 |
+
"transformers_version": "4.36.2",
|
| 27 |
+
"use_cache": true,
|
| 28 |
+
"vocab_size": 32000
|
| 29 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:50383d5abcbbcf01888ac04fe26a5d152ed6b21782c80f1220267168706307c6
|
| 3 |
+
size 36652345632
|
quantize_config.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bits": 4,
|
| 3 |
+
"group_size": 128,
|
| 4 |
+
"damp_percent": 0.1,
|
| 5 |
+
"desc_act": false,
|
| 6 |
+
"static_groups": false,
|
| 7 |
+
"sym": true,
|
| 8 |
+
"true_sequential": true,
|
| 9 |
+
"model_name_or_path": null,
|
| 10 |
+
"model_file_base_name": null
|
| 11 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<s>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": true,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"eos_token": {
|
| 10 |
+
"content": "</s>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": true,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": {
|
| 17 |
+
"content": "<unk>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": true,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"unk_token": {
|
| 24 |
+
"content": "<unk>",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": true,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
}
|
| 30 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer.model
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
|
| 3 |
+
size 499723
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_bos_token": true,
|
| 3 |
+
"add_eos_token": false,
|
| 4 |
+
"added_tokens_decoder": {
|
| 5 |
+
"0": {
|
| 6 |
+
"content": "<unk>",
|
| 7 |
+
"lstrip": false,
|
| 8 |
+
"normalized": true,
|
| 9 |
+
"rstrip": false,
|
| 10 |
+
"single_word": false,
|
| 11 |
+
"special": true
|
| 12 |
+
},
|
| 13 |
+
"1": {
|
| 14 |
+
"content": "<s>",
|
| 15 |
+
"lstrip": false,
|
| 16 |
+
"normalized": true,
|
| 17 |
+
"rstrip": false,
|
| 18 |
+
"single_word": false,
|
| 19 |
+
"special": true
|
| 20 |
+
},
|
| 21 |
+
"2": {
|
| 22 |
+
"content": "</s>",
|
| 23 |
+
"lstrip": false,
|
| 24 |
+
"normalized": true,
|
| 25 |
+
"rstrip": false,
|
| 26 |
+
"single_word": false,
|
| 27 |
+
"special": true
|
| 28 |
+
}
|
| 29 |
+
},
|
| 30 |
+
"bos_token": "<s>",
|
| 31 |
+
"chat_template": "{{ bos_token }}{% for message in messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if message['role'] == 'user' %}{{ '[INST] ' + message['content'] + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ message['content'] + eos_token}}{% else %}{{ raise_exception('Only user and assistant roles are supported!') }}{% endif %}{% endfor %}",
|
| 32 |
+
"clean_up_tokenization_spaces": false,
|
| 33 |
+
"eos_token": "</s>",
|
| 34 |
+
"legacy": false,
|
| 35 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 36 |
+
"pad_token": "<unk>",
|
| 37 |
+
"sp_model_kwargs": {},
|
| 38 |
+
"spaces_between_special_tokens": false,
|
| 39 |
+
"tokenizer_class": "LlamaTokenizer",
|
| 40 |
+
"unk_token": "<unk>",
|
| 41 |
+
"use_default_system_prompt": false
|
| 42 |
+
}
|