Suparious commited on
Commit
009ad6a
·
verified ·
1 Parent(s): 4eb5f58

Add model card

Browse files
Files changed (1) hide show
  1. README.md +126 -0
README.md CHANGED
@@ -1,3 +1,129 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ tags:
3
+ - finetuned
4
+ - quantized
5
+ - 4-bit
6
+ - AWQ
7
+ - transformers
8
+ - pytorch
9
+ - text-generation
10
+ - conversational
11
+ - license:apache-2.0
12
+ - autotrain_compatible
13
+ - endpoints_compatible
14
+ - text-generation-inference
15
+ - finetune
16
+ - chatml
17
+ - generated_from_trainer
18
+ base_model: alnrg2arg/blockchainlabs_7B_merged_test2_4
19
+ model-index:
20
+ - name: Valor-7B-v0.1
21
+ results: []
22
  license: apache-2.0
23
+ datasets:
24
+ - NeuralNovel/Neural-Story-v1
25
+ language:
26
+ - en
27
+ quantized_by: Suparious
28
+ library_name: peft
29
+ pipeline_tag: text-generation
30
+ model_creator: NeuralNovel
31
+ model_name: Valor 7B 0.1
32
+ inference: false
33
+ prompt_template: '<|im_start|>system
34
+
35
+ {system_message}<|im_end|>
36
+
37
+ <|im_start|>user
38
+
39
+ {prompt}<|im_end|>
40
+
41
+ <|im_start|>assistant
42
+
43
+ '
44
  ---
45
+
46
+ # Valor 7B v0.1
47
+
48
+ - Model creator: [NeuralNovel](https://huggingface.co/NeuralNovel)
49
+ - Original model: [Valor-7B-v0.1](https://huggingface.co/NeuralNovel/Valor-7B-v0.1)
50
+
51
+ ![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/645cfe4603fc86c46b3e46d1/CATNxzDDJL6xHR4tc4IMf.jpeg)
52
+
53
+ ## Model Details
54
+
55
+ Valor speaks louder than words.
56
+
57
+ This is a qlora finetune of blockchainlabs_7B_merged_test2_4 using the **Neural-Story-v0.1** dataset, with the intention of increasing creativity and writing ability.
58
+
59
+ ## How to use
60
+
61
+ ### Install the necessary packages
62
+
63
+ ```bash
64
+ pip install --upgrade autoawq autoawq-kernels
65
+ ```
66
+
67
+ ### Example Python code
68
+
69
+ ```python
70
+ from awq import AutoAWQForCausalLM
71
+ from transformers import AutoTokenizer, TextStreamer
72
+
73
+ model_path = "solidrust/Valor-7B-v0.1-AWQ"
74
+ system_message = "You are Valor, incarnated as a powerful AI."
75
+
76
+ # Load model
77
+ model = AutoAWQForCausalLM.from_quantized(model_path,
78
+ fuse_layers=True)
79
+ tokenizer = AutoTokenizer.from_pretrained(model_path,
80
+ trust_remote_code=True)
81
+ streamer = TextStreamer(tokenizer,
82
+ skip_prompt=True,
83
+ skip_special_tokens=True)
84
+
85
+ # Convert prompt to tokens
86
+ prompt_template = """\
87
+ <|im_start|>system
88
+ {system_message}<|im_end|>
89
+ <|im_start|>user
90
+ {prompt}<|im_end|>
91
+ <|im_start|>assistant"""
92
+
93
+ prompt = "You're standing on the surface of the Earth. "\
94
+ "You walk one mile south, one mile west and one mile north. "\
95
+ "You end up exactly where you started. Where are you?"
96
+
97
+ tokens = tokenizer(prompt_template.format(system_message=system_message,prompt=prompt),
98
+ return_tensors='pt').input_ids.cuda()
99
+
100
+ # Generate output
101
+ generation_output = model.generate(tokens,
102
+ streamer=streamer,
103
+ max_new_tokens=512)
104
+
105
+ ```
106
+
107
+ ### About AWQ
108
+
109
+ AWQ is an efficient, accurate and blazing-fast low-bit weight quantization method, currently supporting 4-bit quantization. Compared to GPTQ, it offers faster Transformers-based inference with equivalent or better quality compared to the most commonly used GPTQ settings.
110
+
111
+ AWQ models are currently supported on Linux and Windows, with NVidia GPUs only. macOS users: please use GGUF models instead.
112
+
113
+ It is supported by:
114
+
115
+ - [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
116
+ - [vLLM](https://github.com/vllm-project/vllm) - version 0.2.2 or later for support for all model types.
117
+ - [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
118
+ - [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
119
+ - [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
120
+
121
+ ## Prompt template: ChatML
122
+
123
+ ```plaintext
124
+ <|im_start|>system
125
+ {system_message}<|im_end|>
126
+ <|im_start|>user
127
+ {prompt}<|im_end|>
128
+ <|im_start|>assistant
129
+ ```