初始化项目,由ModelHub XC社区提供模型
Model: speakleash/Bielik-11B-v2.2-Instruct-FP8 Source: Original Platform
This commit is contained in:
35
.gitattributes
vendored
Normal file
35
.gitattributes
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||
*.model filter=lfs diff=lfs merge=lfs -text
|
||||
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||
101
README.md
Normal file
101
README.md
Normal file
@@ -0,0 +1,101 @@
|
||||
---
|
||||
language:
|
||||
- pl
|
||||
license: apache-2.0
|
||||
library_name: transformers
|
||||
tags:
|
||||
- finetuned
|
||||
- gguf
|
||||
- 8bit
|
||||
inference: false
|
||||
pipeline_tag: text-generation
|
||||
base_model: speakleash/Bielik-11B-v2.2-Instruct
|
||||
---
|
||||
<p align="center">
|
||||
<img src="https://huggingface.co/speakleash/Bielik-7B-Instruct-v0.1-GGUF/raw/main/speakleash_cyfronet.png">
|
||||
</p>
|
||||
|
||||
# Bielik-11B-v2.2-Instruct-FP8
|
||||
|
||||
This model was obtained by quantizing the weights and activations of [Bielik-11B-v.2.2-Instruct](https://huggingface.co/speakleash/Bielik-11B-v2.2-Instruct) to FP8 data type, ready for inference with vLLM >= 0.5.0 or SGLang.
|
||||
AutoFP8 is used for quantization. This optimization reduces the number of bits per parameter from 16 to 8, reducing the disk size and GPU memory requirements by approximately 50%.
|
||||
Only the weights and activations of the linear operators within transformers blocks are quantized. Symmetric per-tensor quantization is applied, in which a single linear scaling maps the FP8 representations of the quantized weights and activations.
|
||||
|
||||
FP8 compuation is supported on Nvidia GPUs with compute capability > 8.9 (Ada Lovelace, Hopper).
|
||||
|
||||
**DISCLAIMER: Be aware that quantised models show reduced response quality and possible hallucinations!**
|
||||
|
||||
## Use with vLLM
|
||||
|
||||
This model can be deployed efficiently using the [vLLM](https://docs.vllm.ai/en/latest/) backend, as shown in the example below.
|
||||
|
||||
```python
|
||||
from vllm import LLM, SamplingParams
|
||||
from transformers import AutoTokenizer
|
||||
|
||||
model_id = "speakleash/Bielik-11B-v2.2-Instruct-FP8"
|
||||
|
||||
sampling_params = SamplingParams(temperature=0.2, top_p=0.95, max_tokens=4096)
|
||||
|
||||
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
||||
|
||||
messages = [
|
||||
{"role": "system", "content": "Jesteś pomocnym asystentem Bielik."},
|
||||
{"role": "user", "content": "Kim był Mikołaj Kopernik i z czego zasłynął?"},
|
||||
]
|
||||
|
||||
prompts = tokenizer.apply_chat_template(messages, tokenize=False)
|
||||
|
||||
llm = LLM(model=model_id, max_model_len=4096)
|
||||
|
||||
outputs = llm.generate(prompts, sampling_params)
|
||||
|
||||
generated_text = outputs[0].outputs[0].text
|
||||
print(generated_text)
|
||||
```
|
||||
|
||||
vLLM aslo supports OpenAI-compatible serving. See the [documentation](https://docs.vllm.ai/en/latest/) for more details.
|
||||
|
||||
|
||||
## Use with SGLang Runtime
|
||||
Launch a server of SGLang Runtime:
|
||||
|
||||
```
|
||||
python -m sglang.launch_server --model-path speakleash/Bielik-11B-v2.2-Instruct-FP8 --port 30000
|
||||
```
|
||||
|
||||
Then you can send http request or use OpenAI Compatible API.
|
||||
|
||||
```python
|
||||
import openai
|
||||
client = openai.Client(
|
||||
base_url="http://127.0.0.1:30000/v1", api_key="EMPTY")
|
||||
|
||||
response = client.chat.completions.create(
|
||||
model="default",
|
||||
messages=[
|
||||
{"role": "system", "content": "Jesteś pomocnym asystentem Bielik."},
|
||||
{"role": "user", "content": "Kim był Mikołaj Kopernik i z czego zasłynął?"},
|
||||
],
|
||||
temperature=0,
|
||||
max_tokens=4096,
|
||||
)
|
||||
print(response)
|
||||
|
||||
```
|
||||
|
||||
### Model description:
|
||||
|
||||
* **Developed by:** [SpeakLeash](https://speakleash.org/) & [ACK Cyfronet AGH](https://www.cyfronet.pl/)
|
||||
* **Language:** Polish
|
||||
* **Model type:** causal decoder-only
|
||||
* **Quant from:** [Bielik-11B-v2.2-Instruct](https://huggingface.co/speakleash/Bielik-11B-v2.2-Instruct)
|
||||
* **Finetuned from:** [Bielik-11B-v2](https://huggingface.co/speakleash/Bielik-11B-v2)
|
||||
* **License:** Apache 2.0 and [Terms of Use](https://bielik.ai/terms/)
|
||||
|
||||
### Responsible for model quantization
|
||||
* [Remigiusz Kinas](https://www.linkedin.com/in/remigiusz-kinas/)<sup>SpeakLeash</sup> - team leadership, conceptualizing, calibration data preparation, process creation and quantized model delivery.
|
||||
|
||||
## Contact Us
|
||||
|
||||
If you have any questions or suggestions, please use the discussion tab. If you want to contact us directly, join our [Discord SpeakLeash](https://discord.gg/CPBxPce4).
|
||||
130
added_tokens.json
Normal file
130
added_tokens.json
Normal file
@@ -0,0 +1,130 @@
|
||||
{
|
||||
"<|control_100|>": 32099,
|
||||
"<|control_101|>": 32100,
|
||||
"<|control_102|>": 32101,
|
||||
"<|control_103|>": 32102,
|
||||
"<|control_104|>": 32103,
|
||||
"<|control_105|>": 32104,
|
||||
"<|control_106|>": 32105,
|
||||
"<|control_107|>": 32106,
|
||||
"<|control_108|>": 32107,
|
||||
"<|control_109|>": 32108,
|
||||
"<|control_10|>": 32009,
|
||||
"<|control_110|>": 32109,
|
||||
"<|control_111|>": 32110,
|
||||
"<|control_112|>": 32111,
|
||||
"<|control_113|>": 32112,
|
||||
"<|control_114|>": 32113,
|
||||
"<|control_115|>": 32114,
|
||||
"<|control_116|>": 32115,
|
||||
"<|control_117|>": 32116,
|
||||
"<|control_118|>": 32117,
|
||||
"<|control_119|>": 32118,
|
||||
"<|control_11|>": 32010,
|
||||
"<|control_120|>": 32119,
|
||||
"<|control_121|>": 32120,
|
||||
"<|control_122|>": 32121,
|
||||
"<|control_123|>": 32122,
|
||||
"<|control_124|>": 32123,
|
||||
"<|control_125|>": 32124,
|
||||
"<|control_126|>": 32125,
|
||||
"<|control_127|>": 32126,
|
||||
"<|control_128|>": 32127,
|
||||
"<|control_12|>": 32011,
|
||||
"<|control_13|>": 32012,
|
||||
"<|control_14|>": 32013,
|
||||
"<|control_15|>": 32014,
|
||||
"<|control_16|>": 32015,
|
||||
"<|control_17|>": 32016,
|
||||
"<|control_18|>": 32017,
|
||||
"<|control_19|>": 32018,
|
||||
"<|control_20|>": 32019,
|
||||
"<|control_21|>": 32020,
|
||||
"<|control_22|>": 32021,
|
||||
"<|control_23|>": 32022,
|
||||
"<|control_24|>": 32023,
|
||||
"<|control_25|>": 32024,
|
||||
"<|control_26|>": 32025,
|
||||
"<|control_27|>": 32026,
|
||||
"<|control_28|>": 32027,
|
||||
"<|control_29|>": 32028,
|
||||
"<|control_30|>": 32029,
|
||||
"<|control_31|>": 32030,
|
||||
"<|control_32|>": 32031,
|
||||
"<|control_33|>": 32032,
|
||||
"<|control_34|>": 32033,
|
||||
"<|control_35|>": 32034,
|
||||
"<|control_36|>": 32035,
|
||||
"<|control_37|>": 32036,
|
||||
"<|control_38|>": 32037,
|
||||
"<|control_39|>": 32038,
|
||||
"<|control_40|>": 32039,
|
||||
"<|control_41|>": 32040,
|
||||
"<|control_42|>": 32041,
|
||||
"<|control_43|>": 32042,
|
||||
"<|control_44|>": 32043,
|
||||
"<|control_45|>": 32044,
|
||||
"<|control_46|>": 32045,
|
||||
"<|control_47|>": 32046,
|
||||
"<|control_48|>": 32047,
|
||||
"<|control_49|>": 32048,
|
||||
"<|control_50|>": 32049,
|
||||
"<|control_51|>": 32050,
|
||||
"<|control_52|>": 32051,
|
||||
"<|control_53|>": 32052,
|
||||
"<|control_54|>": 32053,
|
||||
"<|control_55|>": 32054,
|
||||
"<|control_56|>": 32055,
|
||||
"<|control_57|>": 32056,
|
||||
"<|control_58|>": 32057,
|
||||
"<|control_59|>": 32058,
|
||||
"<|control_60|>": 32059,
|
||||
"<|control_61|>": 32060,
|
||||
"<|control_62|>": 32061,
|
||||
"<|control_63|>": 32062,
|
||||
"<|control_64|>": 32063,
|
||||
"<|control_65|>": 32064,
|
||||
"<|control_66|>": 32065,
|
||||
"<|control_67|>": 32066,
|
||||
"<|control_68|>": 32067,
|
||||
"<|control_69|>": 32068,
|
||||
"<|control_6|>": 32005,
|
||||
"<|control_70|>": 32069,
|
||||
"<|control_71|>": 32070,
|
||||
"<|control_72|>": 32071,
|
||||
"<|control_73|>": 32072,
|
||||
"<|control_74|>": 32073,
|
||||
"<|control_75|>": 32074,
|
||||
"<|control_76|>": 32075,
|
||||
"<|control_77|>": 32076,
|
||||
"<|control_78|>": 32077,
|
||||
"<|control_79|>": 32078,
|
||||
"<|control_7|>": 32006,
|
||||
"<|control_80|>": 32079,
|
||||
"<|control_81|>": 32080,
|
||||
"<|control_82|>": 32081,
|
||||
"<|control_83|>": 32082,
|
||||
"<|control_84|>": 32083,
|
||||
"<|control_85|>": 32084,
|
||||
"<|control_86|>": 32085,
|
||||
"<|control_87|>": 32086,
|
||||
"<|control_88|>": 32087,
|
||||
"<|control_89|>": 32088,
|
||||
"<|control_8|>": 32007,
|
||||
"<|control_90|>": 32089,
|
||||
"<|control_91|>": 32090,
|
||||
"<|control_92|>": 32091,
|
||||
"<|control_93|>": 32092,
|
||||
"<|control_94|>": 32093,
|
||||
"<|control_95|>": 32094,
|
||||
"<|control_96|>": 32095,
|
||||
"<|control_97|>": 32096,
|
||||
"<|control_98|>": 32097,
|
||||
"<|control_99|>": 32098,
|
||||
"<|control_9|>": 32008,
|
||||
"<|function_call|>": 32004,
|
||||
"<|function_list|>": 32002,
|
||||
"<|function_output|>": 32003,
|
||||
"<|im_end|>": 32001,
|
||||
"<|im_start|>": 32000
|
||||
}
|
||||
33
config.json
Normal file
33
config.json
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"architectures": [
|
||||
"MistralForCausalLM"
|
||||
],
|
||||
"attention_dropout": 0.0,
|
||||
"bos_token_id": 1,
|
||||
"eos_token_id": [ 32001, 2 ],
|
||||
"head_dim": 128,
|
||||
"hidden_act": "silu",
|
||||
"hidden_size": 4096,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 14336,
|
||||
"max_position_embeddings": 32768,
|
||||
"model_type": "mistral",
|
||||
"num_attention_heads": 32,
|
||||
"num_hidden_layers": 50,
|
||||
"num_key_value_heads": 8,
|
||||
"quantization_config": {
|
||||
"activation_scheme": "static",
|
||||
"ignored_layers": [
|
||||
"lm_head"
|
||||
],
|
||||
"quant_method": "fp8"
|
||||
},
|
||||
"rms_norm_eps": 1e-05,
|
||||
"rope_theta": 1000000,
|
||||
"sliding_window": null,
|
||||
"tie_word_embeddings": false,
|
||||
"torch_dtype": "bfloat16",
|
||||
"transformers_version": "4.44.2",
|
||||
"use_cache": true,
|
||||
"vocab_size": 32128
|
||||
}
|
||||
8
generation_config.json
Normal file
8
generation_config.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"_from_model_config": true,
|
||||
"bos_token_id": 1,
|
||||
"eos_token_id": [ 32001, 2 ],
|
||||
"pad_token_id": 2,
|
||||
"unk_token_id": 0,
|
||||
"transformers_version": "4.44.2"
|
||||
}
|
||||
3
model-00001-of-00003.safetensors
Normal file
3
model-00001-of-00003.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:60d0b45b367468dfe0cc057c46dbc82802fc6e13df607b58852bdfefd823488d
|
||||
size 4944433856
|
||||
3
model-00002-of-00003.safetensors
Normal file
3
model-00002-of-00003.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6b29feb369968a841337020d75cf2624b0cb96afddf91309d0eae777a2b52383
|
||||
size 4958100984
|
||||
3
model-00003-of-00003.safetensors
Normal file
3
model-00003-of-00003.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0b3bad2c8f5f77c1ac65f681ace23d99b6f97a7ff76534c229454f74a77db98e
|
||||
size 1529992664
|
||||
1160
model.safetensors.index.json
Normal file
1160
model.safetensors.index.json
Normal file
File diff suppressed because it is too large
Load Diff
160
special_tokens_map.json
Normal file
160
special_tokens_map.json
Normal file
@@ -0,0 +1,160 @@
|
||||
{
|
||||
"additional_special_tokens": [
|
||||
"<|im_start|>",
|
||||
"<|im_end|>",
|
||||
"<|function_list|>",
|
||||
"<|function_output|>",
|
||||
"<|function_call|>",
|
||||
"<|control_6|>",
|
||||
"<|control_7|>",
|
||||
"<|control_8|>",
|
||||
"<|control_9|>",
|
||||
"<|control_10|>",
|
||||
"<|control_11|>",
|
||||
"<|control_12|>",
|
||||
"<|control_13|>",
|
||||
"<|control_14|>",
|
||||
"<|control_15|>",
|
||||
"<|control_16|>",
|
||||
"<|control_17|>",
|
||||
"<|control_18|>",
|
||||
"<|control_19|>",
|
||||
"<|control_20|>",
|
||||
"<|control_21|>",
|
||||
"<|control_22|>",
|
||||
"<|control_23|>",
|
||||
"<|control_24|>",
|
||||
"<|control_25|>",
|
||||
"<|control_26|>",
|
||||
"<|control_27|>",
|
||||
"<|control_28|>",
|
||||
"<|control_29|>",
|
||||
"<|control_30|>",
|
||||
"<|control_31|>",
|
||||
"<|control_32|>",
|
||||
"<|control_33|>",
|
||||
"<|control_34|>",
|
||||
"<|control_35|>",
|
||||
"<|control_36|>",
|
||||
"<|control_37|>",
|
||||
"<|control_38|>",
|
||||
"<|control_39|>",
|
||||
"<|control_40|>",
|
||||
"<|control_41|>",
|
||||
"<|control_42|>",
|
||||
"<|control_43|>",
|
||||
"<|control_44|>",
|
||||
"<|control_45|>",
|
||||
"<|control_46|>",
|
||||
"<|control_47|>",
|
||||
"<|control_48|>",
|
||||
"<|control_49|>",
|
||||
"<|control_50|>",
|
||||
"<|control_51|>",
|
||||
"<|control_52|>",
|
||||
"<|control_53|>",
|
||||
"<|control_54|>",
|
||||
"<|control_55|>",
|
||||
"<|control_56|>",
|
||||
"<|control_57|>",
|
||||
"<|control_58|>",
|
||||
"<|control_59|>",
|
||||
"<|control_60|>",
|
||||
"<|control_61|>",
|
||||
"<|control_62|>",
|
||||
"<|control_63|>",
|
||||
"<|control_64|>",
|
||||
"<|control_65|>",
|
||||
"<|control_66|>",
|
||||
"<|control_67|>",
|
||||
"<|control_68|>",
|
||||
"<|control_69|>",
|
||||
"<|control_70|>",
|
||||
"<|control_71|>",
|
||||
"<|control_72|>",
|
||||
"<|control_73|>",
|
||||
"<|control_74|>",
|
||||
"<|control_75|>",
|
||||
"<|control_76|>",
|
||||
"<|control_77|>",
|
||||
"<|control_78|>",
|
||||
"<|control_79|>",
|
||||
"<|control_80|>",
|
||||
"<|control_81|>",
|
||||
"<|control_82|>",
|
||||
"<|control_83|>",
|
||||
"<|control_84|>",
|
||||
"<|control_85|>",
|
||||
"<|control_86|>",
|
||||
"<|control_87|>",
|
||||
"<|control_88|>",
|
||||
"<|control_89|>",
|
||||
"<|control_90|>",
|
||||
"<|control_91|>",
|
||||
"<|control_92|>",
|
||||
"<|control_93|>",
|
||||
"<|control_94|>",
|
||||
"<|control_95|>",
|
||||
"<|control_96|>",
|
||||
"<|control_97|>",
|
||||
"<|control_98|>",
|
||||
"<|control_99|>",
|
||||
"<|control_100|>",
|
||||
"<|control_101|>",
|
||||
"<|control_102|>",
|
||||
"<|control_103|>",
|
||||
"<|control_104|>",
|
||||
"<|control_105|>",
|
||||
"<|control_106|>",
|
||||
"<|control_107|>",
|
||||
"<|control_108|>",
|
||||
"<|control_109|>",
|
||||
"<|control_110|>",
|
||||
"<|control_111|>",
|
||||
"<|control_112|>",
|
||||
"<|control_113|>",
|
||||
"<|control_114|>",
|
||||
"<|control_115|>",
|
||||
"<|control_116|>",
|
||||
"<|control_117|>",
|
||||
"<|control_118|>",
|
||||
"<|control_119|>",
|
||||
"<|control_120|>",
|
||||
"<|control_121|>",
|
||||
"<|control_122|>",
|
||||
"<|control_123|>",
|
||||
"<|control_124|>",
|
||||
"<|control_125|>",
|
||||
"<|control_126|>",
|
||||
"<|control_127|>",
|
||||
"<|control_128|>"
|
||||
],
|
||||
"bos_token": {
|
||||
"content": "<s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"eos_token": {
|
||||
"content": "<|im_end|>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"pad_token": {
|
||||
"content": "</s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"unk_token": {
|
||||
"content": "<unk>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
}
|
||||
}
|
||||
92247
tokenizer.json
Normal file
92247
tokenizer.json
Normal file
File diff suppressed because it is too large
Load Diff
BIN
tokenizer.model
(Stored with Git LFS)
Normal file
BIN
tokenizer.model
(Stored with Git LFS)
Normal file
Binary file not shown.
1197
tokenizer_config.json
Normal file
1197
tokenizer_config.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user