初始化项目,由ModelHub XC社区提供模型
Model: KhanhVan/Vistral-7B-Chat-gguf Source: Original Platform
This commit is contained in:
42
.gitattributes
vendored
Normal file
42
.gitattributes
vendored
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
*.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
|
||||||
|
vistral-q8.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
ggml-vistral-7B-chat-q8.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
ggml-vistral-7B-chat-f16.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
ggml-vistral-7B-chat-q4_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
ggml-vistral-7B-chat-q4_1.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
ggml-vistral-7B-chat-q5_0.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
|
ggml-vistral-7B-chat-q5_1.gguf filter=lfs diff=lfs merge=lfs -text
|
||||||
87
README.md
Normal file
87
README.md
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
---
|
||||||
|
license: afl-3.0
|
||||||
|
language:
|
||||||
|
- vi
|
||||||
|
pipeline_tag: text-generation
|
||||||
|
model_name: Vistral-7B-Chat
|
||||||
|
tags:
|
||||||
|
- vistral
|
||||||
|
- mistral
|
||||||
|
- pytorch
|
||||||
|
- uonlp
|
||||||
|
- Viet-Mistral
|
||||||
|
|
||||||
|
prompt_template: '<s>[INST] <<SYS>>
|
||||||
|
Bạn là một trợ lí Tiếng Việt nhiệt tình và trung thực. Hãy luôn trả lời một cách hữu ích nhất có thể, đồng thời giữ an toàn.
|
||||||
|
Câu trả lời của bạn không nên chứa bất kỳ nội dung gây hại, phân biệt chủng tộc, phân biệt giới tính, độc hại, nguy hiểm hoặc bất hợp pháp nào. Hãy đảm bảo rằng các câu trả lời của bạn không có thiên kiến xã hội và mang tính tích cực.Nếu một câu hỏi không có ý nghĩa hoặc không hợp lý về mặt thông tin, hãy giải thích tại sao thay vì trả lời một điều gì đó không chính xác. Nếu bạn không biết câu trả lời cho một câu hỏi, hãy trẳ lời là bạn không biết và vui lòng không chia sẻ thông tin sai lệch.
|
||||||
|
<</SYS>>
|
||||||
|
|
||||||
|
{prompt} [/INST]
|
||||||
|
'
|
||||||
|
quantized_by: chiennv
|
||||||
|
---
|
||||||
|
|
||||||
|
The challenge with large language models is that they cannot be executed locally on your laptop.
|
||||||
|
Thanks to [llama.cpp](https://github.com/ggerganov/llama.cpp) project, it is now feasible to operate our [Vistral-7B-Chat](https://huggingface.co/Viet-Mistral/Vistral-7B-Chat) on a single computer (Window or Macbook) even without a dedicated GPU.
|
||||||
|
|
||||||
|
# Vistral-7B-Chat - GGUF
|
||||||
|
- Model creator: [Viet Mistral](https://huggingface.co/Viet-Mistral/)
|
||||||
|
- Original model: [Vistral-7B-Chat](https://huggingface.co/Viet-Mistral/Vistral-7B-Chat)
|
||||||
|
|
||||||
|
<!-- description start -->
|
||||||
|
## Description
|
||||||
|
|
||||||
|
This repo contains GGUF format model files for [Vistral-7B-Chat](https://huggingface.co/Viet-Mistral/Vistral-7B-Chat).
|
||||||
|
|
||||||
|
<!-- description end -->
|
||||||
|
|
||||||
|
<!-- README_GGUF.md-about-gguf start -->
|
||||||
|
### About GGUF
|
||||||
|
|
||||||
|
GGUF is a new format introduced by the llama.cpp team on August 21st 2023. It is a replacement for GGML. GGUF offers numerous advantages over GGML, such as better tokenization, and support for special tokens. It also supports metadata, and is designed to be extensible.
|
||||||
|
|
||||||
|
Here is several clients and libraries that are known to support GGUF:
|
||||||
|
|
||||||
|
* [llama.cpp](https://github.com/ggerganov/llama.cpp). The source project for GGUF. Offers a CLI and a server option.
|
||||||
|
* [text-generation-webui](https://github.com/oobabooga/text-generation-webui), the most widely used web UI, with many features and powerful extensions. Supports GPU acceleration.
|
||||||
|
* [LM Studio](https://lmstudio.ai/), an easy-to-use and powerful local GUI for Windows and macOS (Silicon), with GPU acceleration.
|
||||||
|
* [ctransformers](https://github.com/marella/ctransformers), a Python library with GPU accel, LangChain support, and OpenAI-compatible AI server.
|
||||||
|
<!-- README_GGUF.md-about-gguf end -->
|
||||||
|
<!-- repositories-available start -->
|
||||||
|
|
||||||
|
<!-- prompt-template start -->
|
||||||
|
## Prompt template: Vistral-7B-Chat
|
||||||
|
|
||||||
|
```
|
||||||
|
<s>[INST] <<SYS>>
|
||||||
|
Bạn là một trợ lí Tiếng Việt nhiệt tình và trung thực. Hãy luôn trả lời một cách hữu ích nhất có thể, đồng thời giữ an toàn.
|
||||||
|
Câu trả lời của bạn không nên chứa bất kỳ nội dung gây hại, phân biệt chủng tộc, phân biệt giới tính, độc hại, nguy hiểm hoặc bất hợp pháp nào. Hãy đảm bảo rằng các câu trả lời của bạn không có thiên kiến xã hội và mang tính tích cực.Nếu một câu hỏi không có ý nghĩa hoặc không hợp lý về mặt thông tin, hãy giải thích tại sao thay vì trả lời một điều gì đó không chính xác. Nếu bạn không biết câu trả lời cho một câu hỏi, hãy trẳ lời là bạn không biết và vui lòng không chia sẻ thông tin sai lệch.
|
||||||
|
<</SYS>>
|
||||||
|
|
||||||
|
{prompt} [/INST]
|
||||||
|
|
||||||
|
```
|
||||||
|
|
||||||
|
You can also use the chat template file in [this repository](https://huggingface.co/chiennv/Vistral-7B-Chat-gguf/blob/main/template_chat.json).
|
||||||
|
<!-- prompt-template end -->
|
||||||
|
|
||||||
|
### LM Studio
|
||||||
|
|
||||||
|
To deploy Vistral locally on LM Studio, ensure you are utilizing the [specified chat template, download here](https://huggingface.co/uonlp/Vistral-7B-Chat-gguf/blob/main/template_chat.json). Before initiating the process, make sure to upload the chat template, as illustrated in the image below:
|
||||||
|
|
||||||
|
<p align="center"> <img src="usage.png" width="650" /> </p>
|
||||||
|
|
||||||
|
This step is crucial for the proper functioning of Vistral on your local machine.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### Use with langchain
|
||||||
|
|
||||||
|
## Citation
|
||||||
|
```
|
||||||
|
@article{chien2023vistral,
|
||||||
|
author = {Chien Van Nguyen, Thuat Nguyen, Quan Nguyen, Huy Huu Nguyen, Björn Plüster, Nam Pham, Huu Nguyen, Patrick Schramowski, Thien Huu Nguyen},
|
||||||
|
title = {Vistral-7B-Chat - Towards a State-of-the-Art Large Language Model for Vietnamese},
|
||||||
|
year = 2023,
|
||||||
|
}
|
||||||
|
```
|
||||||
9
added_tokens.json
Normal file
9
added_tokens.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"</s>": 2,
|
||||||
|
"<</SYS>>": 38366,
|
||||||
|
"<<SYS>>": 38365,
|
||||||
|
"<s>": 1,
|
||||||
|
"<unk>": 0,
|
||||||
|
"[/INST]": 38368,
|
||||||
|
"[INST]": 38367
|
||||||
|
}
|
||||||
41
config.json
Normal file
41
config.json
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
{
|
||||||
|
"_name_or_path": "Viet-Mistral/Vistral-7B-Chat",
|
||||||
|
"architectures": [
|
||||||
|
"MistralForCausalLM"
|
||||||
|
],
|
||||||
|
"attention_dropout": 0.0,
|
||||||
|
"bos_token_id": 1,
|
||||||
|
"eos_token_id": 2,
|
||||||
|
"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": 32,
|
||||||
|
"num_key_value_heads": 8,
|
||||||
|
"quantization_config": {
|
||||||
|
"_load_in_4bit": false,
|
||||||
|
"_load_in_8bit": true,
|
||||||
|
"bnb_4bit_compute_dtype": "float32",
|
||||||
|
"bnb_4bit_quant_storage": "uint8",
|
||||||
|
"bnb_4bit_quant_type": "fp4",
|
||||||
|
"bnb_4bit_use_double_quant": false,
|
||||||
|
"llm_int8_enable_fp32_cpu_offload": false,
|
||||||
|
"llm_int8_has_fp16_weight": false,
|
||||||
|
"llm_int8_skip_modules": null,
|
||||||
|
"llm_int8_threshold": 6.0,
|
||||||
|
"load_in_4bit": false,
|
||||||
|
"load_in_8bit": true,
|
||||||
|
"quant_method": "gguf"
|
||||||
|
},
|
||||||
|
"rms_norm_eps": 1e-05,
|
||||||
|
"rope_theta": 10000.0,
|
||||||
|
"sliding_window": 4096,
|
||||||
|
"tie_word_embeddings": false,
|
||||||
|
"torch_dtype": "float16",
|
||||||
|
"transformers_version": "4.41.2",
|
||||||
|
"use_cache": true,
|
||||||
|
"vocab_size": 38369
|
||||||
|
}
|
||||||
7
generation_config.json
Normal file
7
generation_config.json
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"_from_model_config": true,
|
||||||
|
"bos_token_id": 1,
|
||||||
|
"eos_token_id": 2,
|
||||||
|
"transformers_version": "4.34.0",
|
||||||
|
"use_cache": false
|
||||||
|
}
|
||||||
3
ggml-vistral-7B-chat-f16.gguf
Normal file
3
ggml-vistral-7B-chat-f16.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:957d0977888bbc5f57c65f2f8b64aafe89ff1be3e48c74036919f8270f8a65d1
|
||||||
|
size 14589230144
|
||||||
3
ggml-vistral-7B-chat-q4_0.gguf
Normal file
3
ggml-vistral-7B-chat-q4_0.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:d7a2da04a18ef169248da63ffd4de4218338257ba6741e19dcbfaf1e42d3382a
|
||||||
|
size 4145139360
|
||||||
3
ggml-vistral-7B-chat-q4_1.gguf
Normal file
3
ggml-vistral-7B-chat-q4_1.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:c0872cb68fa0bcde1e739228d67510b58b5ad8f81d9b27dd4db51205fbb1e69a
|
||||||
|
size 4591169440
|
||||||
3
ggml-vistral-7B-chat-q5_0.gguf
Normal file
3
ggml-vistral-7B-chat-q5_0.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:05864a7651a0f3b578e71173b61105b8bb99ef20686776ad637bd8074ac2862e
|
||||||
|
size 5037199520
|
||||||
3
ggml-vistral-7B-chat-q5_1.gguf
Normal file
3
ggml-vistral-7B-chat-q5_1.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:1fea69e9a40e28322a739326d56650d31003fb13ab70db149941dc64cd9f27fe
|
||||||
|
size 5483229600
|
||||||
3
ggml-vistral-7B-chat-q8.gguf
Normal file
3
ggml-vistral-7B-chat-q8.gguf
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:b20319edfcb09f144d1aa684ff49f035085b0151810028384528d3330f04e162
|
||||||
|
size 7751441984
|
||||||
11
special_tokens_map.json
Normal file
11
special_tokens_map.json
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"additional_special_tokens": [
|
||||||
|
"<unk>",
|
||||||
|
"<s>",
|
||||||
|
"</s>"
|
||||||
|
],
|
||||||
|
"bos_token": "<s>",
|
||||||
|
"eos_token": "</s>",
|
||||||
|
"pad_token": "<unk>",
|
||||||
|
"unk_token": "<unk>"
|
||||||
|
}
|
||||||
14
template_chat.json
Normal file
14
template_chat.json
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"name": "Vistral-7B-Chat",
|
||||||
|
"inference_params": {
|
||||||
|
"input_prefix": "<s>[INST] ",
|
||||||
|
"input_suffix": "[/INST] ",
|
||||||
|
"pre_prompt": "Bạn là một trợ lí Tiếng Việt nhiệt tình và trung thực. Hãy luôn trả lời một cách hữu ích nhất có thể, đồng thời giữ an toàn.\nCâu trả lời của bạn không nên chứa bất kỳ nội dung gây hại, phân biệt chủng tộc, phân biệt giới tính, độc hại, nguy hiểm hoặc bất hợp pháp nào. Hãy đảm bảo rằng các câu trả lời của bạn không có thiên kiến xã hội và mang tính tích cực.Nếu một câu hỏi không có ý nghĩa hoặc không hợp lý về mặt thông tin, hãy giải thích tại sao thay vì trả lời một điều gì đó không chính xác. Nếu bạn không biết câu trả lời cho một câu hỏi, hãy trẳ lời là bạn không biết và vui lòng không chia sẻ thông tin sai lệch.",
|
||||||
|
"pre_prompt_prefix": "<s>[INST] <<SYS>>\n",
|
||||||
|
"pre_prompt_suffix": "<</SYS>> \n\n"
|
||||||
|
},
|
||||||
|
"load_params": {
|
||||||
|
"rope_freq_scale": 0,
|
||||||
|
"rope_freq_base": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
108396
tokenizer.json
Normal file
108396
tokenizer.json
Normal file
File diff suppressed because it is too large
Load Diff
3
tokenizer.model
Normal file
3
tokenizer.model
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:e792a804bbfc19a96b61b87109b8f2b0b7c92830025f285b402ba27c0c309c6f
|
||||||
|
size 596883
|
||||||
78
tokenizer_config.json
Normal file
78
tokenizer_config.json
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
{
|
||||||
|
"added_tokens_decoder": {
|
||||||
|
"0": {
|
||||||
|
"content": "<unk>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"1": {
|
||||||
|
"content": "<s>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"2": {
|
||||||
|
"content": "</s>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"38365": {
|
||||||
|
"content": "<<SYS>>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"38366": {
|
||||||
|
"content": "<</SYS>>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"38367": {
|
||||||
|
"content": "[INST]",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"38368": {
|
||||||
|
"content": "[/INST]",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additional_special_tokens": [
|
||||||
|
"<unk>",
|
||||||
|
"<s>",
|
||||||
|
"</s>"
|
||||||
|
],
|
||||||
|
"bos_token": "<s>",
|
||||||
|
"chat_template": "{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% set system_message = false %}{% endif %}{% for message in loop_messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if loop.index0 == 0 and system_message != false %}{% set content = '<<SYS>>\\n' + system_message + '\\n<</SYS>>\\n\\n' + message['content'] %}{% else %}{% set content = message['content'] %}{% endif %}{% if message['role'] == 'user' %}{{ bos_token + '[INST] ' + content.strip() + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ ' ' + content.strip() + ' ' + eos_token }}{% endif %}{% endfor %}",
|
||||||
|
"clean_up_tokenization_spaces": false,
|
||||||
|
"eos_token": "</s>",
|
||||||
|
"legacy": true,
|
||||||
|
"model_max_length": 1000000000000000019884624838656,
|
||||||
|
"pad_token": "<unk>",
|
||||||
|
"sp_model_kwargs": {},
|
||||||
|
"spaces_between_special_tokens": false,
|
||||||
|
"tokenizer_class": "LlamaTokenizer",
|
||||||
|
"unk_token": "<unk>",
|
||||||
|
"use_default_system_prompt": false,
|
||||||
|
"use_fast": true
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user