初始化项目,由ModelHub XC社区提供模型
Model: TheBloke/Orca-2-7B-AWQ Source: Original Platform
This commit is contained in:
36
.gitattributes
vendored
Normal file
36
.gitattributes
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
*.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
|
||||
model.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||
63
LICENSE
Normal file
63
LICENSE
Normal file
@@ -0,0 +1,63 @@
|
||||
MICROSOFT RESEARCH LICENSE TERMS
|
||||
|
||||
IF YOU LIVE IN THE UNITED STATES, PLEASE READ THE “BINDING ARBITRATION AND CLASS ACTION WAIVER” SECTION BELOW. IT AFFECTS HOW DISPUTES ARE RESOLVED.
|
||||
|
||||
These license terms are an agreement between you and Microsoft Corporation (or one of its affiliates). They apply to the source code, object code, machine learning models, or data (collectively “Materials”) that accompany this license. IF YOU COMPLY WITH THESE LICENSE TERMS, YOU HAVE THE RIGHTS BELOW. BY USING THE MATERIALS, YOU ACCEPT THESE TERMS.
|
||||
|
||||
1) INSTALLATION AND USE RIGHTS TO THE MATERIALS.
|
||||
|
||||
Subject to the terms of this agreement, you have the below rights, if applicable, to use the Materials solely for non-commercial, non-revenue generating, research purposes:
|
||||
|
||||
a) Source Code. If source code is included, you may use and modify the source code, but you may not distribute the source code.
|
||||
b) Object Code. If object code is included, you may use the object code, but you may not distribute the object code.
|
||||
c) Models. If machine learning model(s) are included, you may use the model(s), but you may not distribute the models.
|
||||
d) Data. If data is included, you may use and modify the data, but your use and modification must be consistent with the consent under which the data was provided and/or gathered and you may not distribute the data or your modifications to the data.
|
||||
|
||||
2) SCOPE OF LICENSE. The Materials are licensed, not sold. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you will not (and have no right to):
|
||||
|
||||
a) work around any technical limitations in the Materials that only allow you to use it in certain ways;
|
||||
b) reverse engineer, decompile or disassemble the Materials;
|
||||
c) remove, minimize, block, or modify any notices of Microsoft or its suppliers in the Materials;
|
||||
d) use the Materials in any way that is against the law or to create or propagate malware; or
|
||||
e) share, publish, distribute or lend the Materials, provide the Materials as a stand-alone hosted solution for others to use, or transfer the Materials or this agreement to any third party.
|
||||
|
||||
3) PERSONAL DATA. If the data (set forth in Section 1(c) above) includes or is found to include any data that enables any ability to identify an individual (“Personal Data”), you will not use such Personal Data for any purpose other than was authorized and consented to by the data subject/research participant. You will not use Personal Data to contact any person. You will keep Personal Data in strict confidence. You will not share any Personal Data that is collected or in your possession with any third party for any reason and as required under the original consent agreement. Further, you will destroy the Personal Data and any backup or copies, immediately upon the completion of your research.
|
||||
|
||||
4) LICENSE TO MICROSOFT. Notwithstanding the limitations in Section 1, you may distribute your modifications back to Microsoft, and if you do provide Microsoft with modifications of the Materials, you hereby grant Microsoft, without any restrictions or limitations, a non-exclusive, perpetual, irrevocable, royalty-free, assignable and sub-licensable license, to reproduce, publicly perform or display, install, use, modify, post, distribute, make and have made, sell and transfer such modifications and derivatives for any purpose.
|
||||
|
||||
5) PUBLICATION. You may publish (or present papers or articles) on your results from using the Materials provided that no material or substantial portion of the Materials is included in any such publication or presentation.
|
||||
|
||||
6) FEEDBACK. Any feedback about the Materials provided by you to us is voluntarily given, and Microsoft shall be free to use the feedback as it sees fit without obligation or restriction of any kind, even if the feedback is designated by you as confidential. Such feedback shall be considered a contribution and licensed to Microsoft under the terms of Section 4 above.
|
||||
|
||||
7) COMPLIANCE WITH TRADE LAWS. You acknowledge that the Materials may be subject to applicable trade laws in one or more countries. You will comply with all relevant laws and regulations applicable to the import or export of the Materials, including but not limited to, trade laws such as the U.S. Export Administration Regulations or other end-user, end use, and destination restrictions by the U.S. and other governments, as well as sanctions regulations administered by the U.S. Office of Foreign Assets Control. Microsoft may suspend or terminate the agreement immediately to the extent that Microsoft reasonably concludes that continued performance would violate trade laws or put it at risk of becoming subject to sanctions or penalties under trade laws. For additional information, see www.microsoft.com/exporting.
|
||||
|
||||
8) SUPPORT SERVICES. Microsoft is not obligated under this agreement to provide any support services for the Materials. Any support provided is “as is”, “with all faults”, and without warranty of any kind.
|
||||
|
||||
9) BINDING ARBITRATION AND CLASS ACTION WAIVER. This Section applies if you live in (or, if a business, your principal place of business is in) the United States. If you and Microsoft have a dispute, you and Microsoft agree to try for 60 days to resolve it informally. If you and Microsoft can’t, you and Microsoft agree to binding individual arbitration before the American Arbitration Association under the Federal Arbitration Act (“FAA”), and not to sue in court in front of a judge or jury. Instead, a neutral arbitrator will decide. Class action lawsuits, class-wide arbitrations, private attorney-general actions, and any other proceeding where someone acts in a representative capacity are not allowed; nor is combining individual proceedings without the consent of all parties. The complete Arbitration Agreement contains more terms and is at aka.ms/arb-agreement-1. You and Microsoft agree to these terms.
|
||||
|
||||
10) ENTIRE AGREEMENT. This agreement, and any other terms Microsoft may provide for supplements, updates, or third-party applications, is the entire agreement for the Materials.
|
||||
|
||||
11) APPLICABLE LAW AND PLACE TO RESOLVE DISPUTES. If you acquired the Materials in the United States or Canada, the laws of the state or province where you live (or, if a business, where your principal place of business is located) govern the interpretation of this agreement, claims for its breach, and all other claims (including consumer protection, unfair competition, and tort claims), regardless of conflict of laws principles, except that the FAA governs everything related to arbitration. If you acquired the Materials in any other country, its laws apply, except that the FAA governs everything related to arbitration. If U.S. federal jurisdiction exists, you and Microsoft consent to exclusive jurisdiction and venue in the federal court in King County, Washington for all disputes heard in court (excluding arbitration). If not, you and Microsoft consent to exclusive jurisdiction and venue in the Superior Court of King County, Washington for all disputes heard in court (excluding arbitration).
|
||||
|
||||
12) CONSUMER RIGHTS; REGIONAL VARIATIONS. This agreement describes certain legal rights. You may have other rights, including consumer rights, under the laws of your state, province, or country. Separate and apart from your relationship with Microsoft, you may also have rights with respect to the party from which you acquired the Materials. This agreement does not change those other rights if the laws of your state, province, or country do not permit it to do so. For example, if you acquired the Materials in one of the below regions, or mandatory country law applies, then the following provisions apply to you:
|
||||
|
||||
a) Australia. You have statutory guarantees under the Australian Consumer Law and nothing in this agreement is intended to affect those rights.
|
||||
|
||||
b) Canada. If you acquired this software in Canada, you may stop receiving updates by turning off the automatic update feature, disconnecting your device from the Internet (if and when you re-connect to the Internet, however, the Materials will resume checking for and installing updates), or uninstalling the Materials. The product documentation, if any, may also specify how to turn off updates for your specific device or software.
|
||||
|
||||
c) Germany and Austria.
|
||||
|
||||
i. Warranty. The properly licensed software will perform substantially as described in any Microsoft materials that accompany the Materials. However, Microsoft gives no contractual guarantee in relation to the licensed software.
|
||||
|
||||
ii. Limitation of Liability. In case of intentional conduct, gross negligence, claims based on the Product Liability Act, as well as, in case of death or personal or physical injury, Microsoft is liable according to the statutory law.
|
||||
|
||||
Subject to the foregoing clause (ii), Microsoft will only be liable for slight negligence if Microsoft is in breach of such material contractual obligations, the fulfillment of which facilitate the due performance of this agreement, the breach of which would endanger the purpose of this agreement and the compliance with which a party may constantly trust in (so-called "cardinal obligations"). In other cases of slight negligence, Microsoft will not be liable for slight negligence.
|
||||
|
||||
13) DISCLAIMER OF WARRANTY. THE MATERIALS ARE LICENSED “AS IS.” YOU BEAR THE RISK OF USING THEM. MICROSOFT GIVES NO EXPRESS WARRANTIES, GUARANTEES, OR CONDITIONS. TO THE EXTENT PERMITTED UNDER APPLICABLE LAWS, MICROSOFT EXCLUDES ALL IMPLIED WARRANTIES, INCLUDING MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
||||
|
||||
14) LIMITATION ON AND EXCLUSION OF DAMAGES. IF YOU HAVE ANY BASIS FOR RECOVERING DAMAGES DESPITE THE PRECEDING DISCLAIMER OF WARRANTY, YOU CAN RECOVER FROM MICROSOFT AND ITS SUPPLIERS ONLY DIRECT DAMAGES UP TO U.S. $5.00. YOU CANNOT RECOVER ANY OTHER DAMAGES, INCLUDING CONSEQUENTIAL, LOST PROFITS, SPECIAL, INDIRECT OR INCIDENTAL DAMAGES.
|
||||
|
||||
This limitation applies to (a) anything related to the Materials, services, content (including code) on third party Internet sites, or third party applications; and (b) claims for breach of contract, warranty, guarantee, or condition; strict liability, negligence, or other tort; or any other claim; in each case to the extent permitted by applicable law.
|
||||
|
||||
It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your state, province, or country may not allow the exclusion or limitation of incidental, consequential, or other damages.
|
||||
|
||||
1
Notice
Normal file
1
Notice
Normal file
@@ -0,0 +1 @@
|
||||
Llama 2 is licensed under the LLAMA 2 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.
|
||||
601
README.md
Normal file
601
README.md
Normal file
@@ -0,0 +1,601 @@
|
||||
---
|
||||
base_model: microsoft/Orca-2-7b
|
||||
inference: false
|
||||
license: other
|
||||
model_creator: Microsoft
|
||||
model_name: Orca 2 7B
|
||||
model_type: llama
|
||||
pipeline_tag: text-generation
|
||||
prompt_template: '<|im_start|>system
|
||||
|
||||
{system_message}<|im_end|>
|
||||
|
||||
<|im_start|>user
|
||||
|
||||
{prompt}<|im_end|>
|
||||
|
||||
<|im_start|>assistant
|
||||
|
||||
'
|
||||
quantized_by: TheBloke
|
||||
tags:
|
||||
- orca
|
||||
- orca2
|
||||
- microsoft
|
||||
---
|
||||
<!-- markdownlint-disable MD041 -->
|
||||
|
||||
<!-- header start -->
|
||||
<!-- 200823 -->
|
||||
<div style="width: auto; margin-left: auto; margin-right: auto">
|
||||
<img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
|
||||
</div>
|
||||
<div style="display: flex; justify-content: space-between; width: 100%;">
|
||||
<div style="display: flex; flex-direction: column; align-items: flex-start;">
|
||||
<p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: column; align-items: flex-end;">
|
||||
<p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
|
||||
</div>
|
||||
</div>
|
||||
<div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div>
|
||||
<hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
|
||||
<!-- header end -->
|
||||
|
||||
# Orca 2 7B - AWQ
|
||||
- Model creator: [Microsoft](https://huggingface.co/microsoft)
|
||||
- Original model: [Orca 2 7B](https://huggingface.co/microsoft/Orca-2-7b)
|
||||
|
||||
<!-- description start -->
|
||||
## Description
|
||||
|
||||
This repo contains AWQ model files for [Microsoft's Orca 2 7B](https://huggingface.co/microsoft/Orca-2-7b).
|
||||
|
||||
These files were quantised using hardware kindly provided by [Massed Compute](https://massedcompute.com/).
|
||||
|
||||
|
||||
### About AWQ
|
||||
|
||||
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.
|
||||
|
||||
It is supported by:
|
||||
|
||||
- [Text Generation Webui](https://github.com/oobabooga/text-generation-webui) - using Loader: AutoAWQ
|
||||
- [vLLM](https://github.com/vllm-project/vllm) - Llama and Mistral models only
|
||||
- [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference)
|
||||
- [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later, from any code or client that supports Transformers
|
||||
- [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) - for use from Python code
|
||||
|
||||
<!-- description end -->
|
||||
<!-- repositories-available start -->
|
||||
## Repositories available
|
||||
|
||||
* [AWQ model(s) for GPU inference.](https://huggingface.co/TheBloke/Orca-2-7B-AWQ)
|
||||
* [GPTQ models for GPU inference, with multiple quantisation parameter options.](https://huggingface.co/TheBloke/Orca-2-7B-GPTQ)
|
||||
* [2, 3, 4, 5, 6 and 8-bit GGUF models for CPU+GPU inference](https://huggingface.co/TheBloke/Orca-2-7B-GGUF)
|
||||
* [Microsoft's original unquantised fp16 model in pytorch format, for GPU inference and for further conversions](https://huggingface.co/microsoft/Orca-2-7b)
|
||||
<!-- repositories-available end -->
|
||||
|
||||
<!-- prompt-template start -->
|
||||
## Prompt template: ChatML
|
||||
|
||||
```
|
||||
<|im_start|>system
|
||||
{system_message}<|im_end|>
|
||||
<|im_start|>user
|
||||
{prompt}<|im_end|>
|
||||
<|im_start|>assistant
|
||||
|
||||
```
|
||||
|
||||
<!-- prompt-template end -->
|
||||
|
||||
|
||||
<!-- README_AWQ.md-provided-files start -->
|
||||
## Provided files, and AWQ parameters
|
||||
|
||||
I currently release 128g GEMM models only. The addition of group_size 32 models, and GEMV kernel models, is being actively considered.
|
||||
|
||||
Models are released as sharded safetensors files.
|
||||
|
||||
| Branch | Bits | GS | AWQ Dataset | Seq Len | Size |
|
||||
| ------ | ---- | -- | ----------- | ------- | ---- |
|
||||
| [main](https://huggingface.co/TheBloke/Orca-2-7B-AWQ/tree/main) | 4 | 128 | [c4](https://huggingface.co/datasets/allenai/c4/viewer/allenai--c4) | 4096 | 3.89 GB
|
||||
|
||||
<!-- README_AWQ.md-provided-files end -->
|
||||
|
||||
<!-- README_AWQ.md-text-generation-webui start -->
|
||||
## How to easily download and use this model in [text-generation-webui](https://github.com/oobabooga/text-generation-webui)
|
||||
|
||||
Please make sure you're using the latest version of [text-generation-webui](https://github.com/oobabooga/text-generation-webui).
|
||||
|
||||
It is strongly recommended to use the text-generation-webui one-click-installers unless you're sure you know how to make a manual install.
|
||||
|
||||
1. Click the **Model tab**.
|
||||
2. Under **Download custom model or LoRA**, enter `TheBloke/Orca-2-7B-AWQ`.
|
||||
3. Click **Download**.
|
||||
4. The model will start downloading. Once it's finished it will say "Done".
|
||||
5. In the top left, click the refresh icon next to **Model**.
|
||||
6. In the **Model** dropdown, choose the model you just downloaded: `Orca-2-7B-AWQ`
|
||||
7. Select **Loader: AutoAWQ**.
|
||||
8. Click Load, and the model will load and is now ready for use.
|
||||
9. If you want any custom settings, set them and then click **Save settings for this model** followed by **Reload the Model** in the top right.
|
||||
10. Once you're ready, click the **Text Generation** tab and enter a prompt to get started!
|
||||
<!-- README_AWQ.md-text-generation-webui end -->
|
||||
|
||||
<!-- README_AWQ.md-use-from-vllm start -->
|
||||
## Multi-user inference server: vLLM
|
||||
|
||||
Documentation on installing and using vLLM [can be found here](https://vllm.readthedocs.io/en/latest/).
|
||||
|
||||
- Please ensure you are using vLLM version 0.2 or later.
|
||||
- When using vLLM as a server, pass the `--quantization awq` parameter.
|
||||
|
||||
For example:
|
||||
|
||||
```shell
|
||||
python3 -m vllm.entrypoints.api_server --model TheBloke/Orca-2-7B-AWQ --quantization awq --dtype auto
|
||||
```
|
||||
|
||||
- When using vLLM from Python code, again set `quantization=awq`.
|
||||
|
||||
For example:
|
||||
|
||||
```python
|
||||
from vllm import LLM, SamplingParams
|
||||
|
||||
prompts = [
|
||||
"Tell me about AI",
|
||||
"Write a story about llamas",
|
||||
"What is 291 - 150?",
|
||||
"How much wood would a woodchuck chuck if a woodchuck could chuck wood?",
|
||||
]
|
||||
prompt_template=f'''<|im_start|>system
|
||||
{system_message}<|im_end|>
|
||||
<|im_start|>user
|
||||
{prompt}<|im_end|>
|
||||
<|im_start|>assistant
|
||||
'''
|
||||
|
||||
prompts = [prompt_template.format(prompt=prompt) for prompt in prompts]
|
||||
|
||||
sampling_params = SamplingParams(temperature=0.8, top_p=0.95)
|
||||
|
||||
llm = LLM(model="TheBloke/Orca-2-7B-AWQ", quantization="awq", dtype="auto")
|
||||
|
||||
outputs = llm.generate(prompts, sampling_params)
|
||||
|
||||
# Print the outputs.
|
||||
for output in outputs:
|
||||
prompt = output.prompt
|
||||
generated_text = output.outputs[0].text
|
||||
print(f"Prompt: {prompt!r}, Generated text: {generated_text!r}")
|
||||
```
|
||||
<!-- README_AWQ.md-use-from-vllm start -->
|
||||
|
||||
<!-- README_AWQ.md-use-from-tgi start -->
|
||||
## Multi-user inference server: Hugging Face Text Generation Inference (TGI)
|
||||
|
||||
Use TGI version 1.1.0 or later. The official Docker container is: `ghcr.io/huggingface/text-generation-inference:1.1.0`
|
||||
|
||||
Example Docker parameters:
|
||||
|
||||
```shell
|
||||
--model-id TheBloke/Orca-2-7B-AWQ --port 3000 --quantize awq --max-input-length 3696 --max-total-tokens 4096 --max-batch-prefill-tokens 4096
|
||||
```
|
||||
|
||||
Example Python code for interfacing with TGI (requires [huggingface-hub](https://github.com/huggingface/huggingface_hub) 0.17.0 or later):
|
||||
|
||||
```shell
|
||||
pip3 install huggingface-hub
|
||||
```
|
||||
|
||||
```python
|
||||
from huggingface_hub import InferenceClient
|
||||
|
||||
endpoint_url = "https://your-endpoint-url-here"
|
||||
|
||||
prompt = "Tell me about AI"
|
||||
prompt_template=f'''<|im_start|>system
|
||||
{system_message}<|im_end|>
|
||||
<|im_start|>user
|
||||
{prompt}<|im_end|>
|
||||
<|im_start|>assistant
|
||||
'''
|
||||
|
||||
client = InferenceClient(endpoint_url)
|
||||
response = client.text_generation(prompt,
|
||||
max_new_tokens=128,
|
||||
do_sample=True,
|
||||
temperature=0.7,
|
||||
top_p=0.95,
|
||||
top_k=40,
|
||||
repetition_penalty=1.1)
|
||||
|
||||
print(f"Model output: ", response)
|
||||
```
|
||||
<!-- README_AWQ.md-use-from-tgi end -->
|
||||
|
||||
<!-- README_AWQ.md-use-from-python start -->
|
||||
## Inference from Python code using Transformers
|
||||
|
||||
### Install the necessary packages
|
||||
|
||||
- Requires: [Transformers](https://huggingface.co/docs/transformers) 4.35.0 or later.
|
||||
- Requires: [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) 0.1.6 or later.
|
||||
|
||||
```shell
|
||||
pip3 install --upgrade "autoawq>=0.1.6" "transformers>=4.35.0"
|
||||
```
|
||||
|
||||
Note that if you are using PyTorch 2.0.1, the above AutoAWQ command will automatically upgrade you to PyTorch 2.1.0.
|
||||
|
||||
If you are using CUDA 11.8 and wish to continue using PyTorch 2.0.1, instead run this command:
|
||||
|
||||
```shell
|
||||
pip3 install https://github.com/casper-hansen/AutoAWQ/releases/download/v0.1.6/autoawq-0.1.6+cu118-cp310-cp310-linux_x86_64.whl
|
||||
```
|
||||
|
||||
If you have problems installing [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) using the pre-built wheels, install it from source instead:
|
||||
|
||||
```shell
|
||||
pip3 uninstall -y autoawq
|
||||
git clone https://github.com/casper-hansen/AutoAWQ
|
||||
cd AutoAWQ
|
||||
pip3 install .
|
||||
```
|
||||
|
||||
### Transformers example code (requires Transformers 4.35.0 and later)
|
||||
|
||||
```python
|
||||
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
|
||||
|
||||
model_name_or_path = "TheBloke/Orca-2-7B-AWQ"
|
||||
|
||||
tokenizer = AutoTokenizer.from_pretrained(model_name_or_path)
|
||||
model = AutoModelForCausalLM.from_pretrained(
|
||||
model_name_or_path,
|
||||
low_cpu_mem_usage=True,
|
||||
device_map="cuda:0"
|
||||
)
|
||||
|
||||
# Using the text streamer to stream output one token at a time
|
||||
streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
|
||||
|
||||
prompt = "Tell me about AI"
|
||||
prompt_template=f'''<|im_start|>system
|
||||
{system_message}<|im_end|>
|
||||
<|im_start|>user
|
||||
{prompt}<|im_end|>
|
||||
<|im_start|>assistant
|
||||
'''
|
||||
|
||||
# Convert prompt to tokens
|
||||
tokens = tokenizer(
|
||||
prompt_template,
|
||||
return_tensors='pt'
|
||||
).input_ids.cuda()
|
||||
|
||||
generation_params = {
|
||||
"do_sample": True,
|
||||
"temperature": 0.7,
|
||||
"top_p": 0.95,
|
||||
"top_k": 40,
|
||||
"max_new_tokens": 512,
|
||||
"repetition_penalty": 1.1
|
||||
}
|
||||
|
||||
# Generate streamed output, visible one token at a time
|
||||
generation_output = model.generate(
|
||||
tokens,
|
||||
streamer=streamer,
|
||||
**generation_params
|
||||
)
|
||||
|
||||
# Generation without a streamer, which will include the prompt in the output
|
||||
generation_output = model.generate(
|
||||
tokens,
|
||||
**generation_params
|
||||
)
|
||||
|
||||
# Get the tokens from the output, decode them, print them
|
||||
token_output = generation_output[0]
|
||||
text_output = tokenizer.decode(token_output)
|
||||
print("model.generate output: ", text_output)
|
||||
|
||||
# Inference is also possible via Transformers' pipeline
|
||||
from transformers import pipeline
|
||||
|
||||
pipe = pipeline(
|
||||
"text-generation",
|
||||
model=model,
|
||||
tokenizer=tokenizer,
|
||||
**generation_params
|
||||
)
|
||||
|
||||
pipe_output = pipe(prompt_template)[0]['generated_text']
|
||||
print("pipeline output: ", pipe_output)
|
||||
|
||||
```
|
||||
<!-- README_AWQ.md-use-from-python end -->
|
||||
|
||||
<!-- README_AWQ.md-compatibility start -->
|
||||
## Compatibility
|
||||
|
||||
The files provided are tested to work with:
|
||||
|
||||
- [text-generation-webui](https://github.com/oobabooga/text-generation-webui) using `Loader: AutoAWQ`.
|
||||
- [vLLM](https://github.com/vllm-project/vllm) version 0.2.0 and later.
|
||||
- [Hugging Face Text Generation Inference (TGI)](https://github.com/huggingface/text-generation-inference) version 1.1.0 and later.
|
||||
- [Transformers](https://huggingface.co/docs/transformers) version 4.35.0 and later.
|
||||
- [AutoAWQ](https://github.com/casper-hansen/AutoAWQ) version 0.1.1 and later.
|
||||
|
||||
<!-- README_AWQ.md-compatibility end -->
|
||||
|
||||
<!-- footer start -->
|
||||
<!-- 200823 -->
|
||||
## Discord
|
||||
|
||||
For further support, and discussions on these models and AI in general, join us at:
|
||||
|
||||
[TheBloke AI's Discord server](https://discord.gg/theblokeai)
|
||||
|
||||
## Thanks, and how to contribute
|
||||
|
||||
Thanks to the [chirper.ai](https://chirper.ai) team!
|
||||
|
||||
Thanks to Clay from [gpus.llm-utils.org](llm-utils)!
|
||||
|
||||
I've had a lot of people ask if they can contribute. I enjoy providing models and helping people, and would love to be able to spend even more time doing it, as well as expanding into new projects like fine tuning/training.
|
||||
|
||||
If you're able and willing to contribute it will be most gratefully received and will help me to keep providing more models, and to start work on new AI projects.
|
||||
|
||||
Donaters will get priority support on any and all AI/LLM/model questions and requests, access to a private Discord room, plus other benefits.
|
||||
|
||||
* Patreon: https://patreon.com/TheBlokeAI
|
||||
* Ko-Fi: https://ko-fi.com/TheBlokeAI
|
||||
|
||||
**Special thanks to**: Aemon Algiz.
|
||||
|
||||
**Patreon special mentions**: Brandon Frisco, LangChain4j, Spiking Neurons AB, transmissions 11, Joseph William Delisle, Nitin Borwankar, Willem Michiel, Michael Dempsey, vamX, Jeffrey Morgan, zynix, jjj, Omer Bin Jawed, Sean Connelly, jinyuan sun, Jeromy Smith, Shadi, Pawan Osman, Chadd, Elijah Stavena, Illia Dulskyi, Sebastain Graf, Stephen Murray, terasurfer, Edmond Seymore, Celu Ramasamy, Mandus, Alex, biorpg, Ajan Kanaga, Clay Pascal, Raven Klaugh, 阿明, K, ya boyyy, usrbinkat, Alicia Loh, John Villwock, ReadyPlayerEmma, Chris Smitley, Cap'n Zoog, fincy, GodLy, S_X, sidney chen, Cory Kujawski, OG, Mano Prime, AzureBlack, Pieter, Kalila, Spencer Kim, Tom X Nguyen, Stanislav Ovsiannikov, Michael Levine, Andrey, Trailburnt, Vadim, Enrico Ros, Talal Aujan, Brandon Phillips, Jack West, Eugene Pentland, Michael Davis, Will Dee, webtim, Jonathan Leane, Alps Aficionado, Rooh Singh, Tiffany J. Kim, theTransient, Luke @flexchar, Elle, Caitlyn Gatomon, Ari Malik, subjectnull, Johann-Peter Hartmann, Trenton Dambrowitz, Imad Khwaja, Asp the Wyvern, Emad Mostaque, Rainer Wilmers, Alexandros Triantafyllidis, Nicholas, Pedro Madruga, SuperWojo, Harry Royden McLaughlin, James Bentley, Olakabola, David Ziegler, Ai Maven, Jeff Scroggin, Nikolai Manek, Deo Leter, Matthew Berman, Fen Risland, Ken Nordquist, Manuel Alberto Morcote, Luke Pendergrass, TL, Fred von Graf, Randy H, Dan Guido, NimbleBox.ai, Vitor Caleffi, Gabriel Tamborski, knownsqashed, Lone Striker, Erik Bjäreholt, John Detwiler, Leonard Tan, Iucharbius
|
||||
|
||||
|
||||
Thank you to all my generous patrons and donaters!
|
||||
|
||||
And thank you again to a16z for their generous grant.
|
||||
|
||||
<!-- footer end -->
|
||||
|
||||
# Original model card: Microsoft's Orca 2 7B
|
||||
|
||||
|
||||
# Orca 2
|
||||
|
||||
<!-- Provide a quick summary of what the model is/does. -->
|
||||
|
||||
Orca 2 is a helpful assistant that is built for research purposes only and provides a single turn response
|
||||
in tasks such as reasoning over user given data, reading comprehension, math problem solving and text summarization.
|
||||
The model is designed to excel particularly in reasoning.
|
||||
|
||||
We open-source Orca 2 to encourage further research on the development, evaluation, and alignment of smaller LMs.
|
||||
|
||||
## What is Orca 2’s intended use(s)?
|
||||
|
||||
+ Orca 2 is built for research purposes only.
|
||||
+ The main purpose is to allow the research community to assess its abilities and to provide a foundation for building better frontier models.
|
||||
|
||||
## How was Orca 2 evaluated?
|
||||
|
||||
+ Orca 2 has been evaluated on a large number of tasks ranging from reasoning to grounding and safety. Please refer
|
||||
to Section 6 and Appendix in the [Orca 2 paper](https://arxiv.org/pdf/2311.11045.pdf) for details on evaluations.
|
||||
|
||||
## Model Details
|
||||
|
||||
Orca 2 is a finetuned version of LLAMA-2. Orca 2’s training data is a synthetic dataset that was created to enhance the small model’s reasoning abilities.
|
||||
All synthetic training data was moderated using the Microsoft Azure content filters. More details about the model can be found in the [Orca 2 paper](https://arxiv.org/pdf/2311.11045.pdf).
|
||||
|
||||
Please refer to LLaMA-2 technical report for details on the model architecture.
|
||||
|
||||
## License
|
||||
|
||||
Orca 2 is licensed under the [Microsoft Research License](LICENSE).
|
||||
|
||||
Llama 2 is licensed under the [LLAMA 2 Community License](https://ai.meta.com/llama/license/), Copyright © Meta Platforms, Inc. All Rights Reserved.
|
||||
|
||||
## Bias, Risks, and Limitations
|
||||
|
||||
Orca 2, built upon the LLaMA 2 model family, retains many of its limitations, as well as the
|
||||
common limitations of other large language models or limitation caused by its training
|
||||
process, including:
|
||||
|
||||
**Data Biases**: Large language models, trained on extensive data, can inadvertently carry
|
||||
biases present in the source data. Consequently, the models may generate outputs that could
|
||||
be potentially biased or unfair.
|
||||
|
||||
**Lack of Contextual Understanding**: Despite their impressive capabilities in language understanding and generation, these models exhibit limited real-world understanding, resulting
|
||||
in potential inaccuracies or nonsensical responses.
|
||||
|
||||
**Lack of Transparency**: Due to the complexity and size, large language models can act
|
||||
as “black boxes”, making it difficult to comprehend the rationale behind specific outputs or
|
||||
decisions. We recommend reviewing transparency notes from Azure for more information.
|
||||
|
||||
**Content Harms**: There are various types of content harms that large language models
|
||||
can cause. It is important to be aware of them when using these models, and to take
|
||||
actions to prevent them. It is recommended to leverage various content moderation services
|
||||
provided by different companies and institutions. On an important note, we hope for better
|
||||
regulations and standards from government and technology leaders around content harms
|
||||
for AI technologies in future. We value and acknowledge the important role that research
|
||||
and open source community can play in this direction.
|
||||
|
||||
**Hallucination**: It is important to be aware and cautious not to entirely rely on a given
|
||||
language model for critical decisions or information that might have deep impact as it is
|
||||
not obvious how to prevent these models from fabricating content. Moreover, it is not clear
|
||||
whether small models may be more susceptible to hallucination in ungrounded generation
|
||||
use cases due to their smaller sizes and hence reduced memorization capacities. This is an
|
||||
active research topic and we hope there will be more rigorous measurement, understanding
|
||||
and mitigations around this topic.
|
||||
|
||||
**Potential for Misuse**: Without suitable safeguards, there is a risk that these models could
|
||||
be maliciously used for generating disinformation or harmful content.
|
||||
|
||||
**Data Distribution**: Orca 2’s performance is likely to correlate strongly with the distribution
|
||||
of the tuning data. This correlation might limit its accuracy in areas underrepresented in
|
||||
the training dataset such as math, coding, and reasoning.
|
||||
|
||||
**System messages**: Orca 2 demonstrates variance in performance depending on the system
|
||||
instructions. Additionally, the stochasticity introduced by the model size may lead to
|
||||
generation of non-deterministic responses to different system instructions.
|
||||
|
||||
**Zero-Shot Settings**: Orca 2 was trained on data that mostly simulate zero-shot settings.
|
||||
While the model demonstrate very strong performance in zero-shot settings, it does not show
|
||||
the same gains of using few-shot learning compared to other, specially larger, models.
|
||||
|
||||
**Synthetic data**: As Orca 2 is trained on synthetic data, it could inherit both the advantages
|
||||
and shortcomings of the models and methods used for data generation. We posit that Orca
|
||||
2 benefits from the safety measures incorporated during training and safety guardrails (e.g.,
|
||||
content filter) within the Azure OpenAI API. However, detailed studies are required for
|
||||
better quantification of such risks.
|
||||
|
||||
This model is solely designed for research settings, and its testing has only been carried
|
||||
out in such environments. It should not be used in downstream applications, as additional
|
||||
analysis is needed to assess potential harm or bias in the proposed application.
|
||||
|
||||
## Getting started with Orca 2
|
||||
|
||||
**Inference with Hugging Face library**
|
||||
|
||||
```python
|
||||
import torch
|
||||
import transformers
|
||||
|
||||
if torch.cuda.is_available():
|
||||
torch.set_default_device("cuda")
|
||||
else:
|
||||
torch.set_default_device("cpu")
|
||||
|
||||
model = transformers.AutoModelForCausalLM.from_pretrained("microsoft/Orca-2-7b", device_map='auto')
|
||||
|
||||
# https://github.com/huggingface/transformers/issues/27132
|
||||
# please use the slow tokenizer since fast and slow tokenizer produces different tokens
|
||||
tokenizer = transformers.AutoTokenizer.from_pretrained(
|
||||
"microsoft/Orca-2-7b",
|
||||
use_fast=False,
|
||||
)
|
||||
|
||||
system_message = "You are Orca, an AI language model created by Microsoft. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior."
|
||||
user_message = "How can you determine if a restaurant is popular among locals or mainly attracts tourists, and why might this information be useful?"
|
||||
|
||||
prompt = f"<|im_start|>system\n{system_message}<|im_end|>\n<|im_start|>user\n{user_message}<|im_end|>\n<|im_start|>assistant"
|
||||
|
||||
inputs = tokenizer(prompt, return_tensors='pt')
|
||||
output_ids = model.generate(inputs["input_ids"],)
|
||||
answer = tokenizer.batch_decode(output_ids)[0]
|
||||
|
||||
print(answer)
|
||||
|
||||
# This example continues showing how to add a second turn message by the user to the conversation
|
||||
second_turn_user_message = "Give me a list of the key points of your first answer."
|
||||
|
||||
# we set add_special_tokens=False because we dont want to automatically add a bos_token between messages
|
||||
second_turn_message_in_markup = f"\n<|im_start|>user\n{second_turn_user_message}<|im_end|>\n<|im_start|>assistant"
|
||||
second_turn_tokens = tokenizer(second_turn_message_in_markup, return_tensors='pt', add_special_tokens=False)
|
||||
second_turn_input = torch.cat([output_ids, second_turn_tokens['input_ids']], dim=1)
|
||||
|
||||
output_ids_2 = model.generate(second_turn_input,)
|
||||
second_turn_answer = tokenizer.batch_decode(output_ids_2)[0]
|
||||
|
||||
print(second_turn_answer)
|
||||
```
|
||||
|
||||
|
||||
**Safe inference with Azure AI Content Safety**
|
||||
|
||||
The usage of [Azure AI Content Safety](https://azure.microsoft.com/en-us/products/ai-services/ai-content-safety/) on top of model prediction is strongly encouraged
|
||||
and can help preventing some of content harms. Azure AI Content Safety is a content moderation platform
|
||||
that uses AI to moderate content. By having Azure AI Content Safety on the output of Orca 2,
|
||||
the model output can be moderated by scanning it for different harm categories including sexual content, violence, hate, and
|
||||
self-harm with multiple severity levels and multi-lingual detection.
|
||||
|
||||
```python
|
||||
import os
|
||||
import math
|
||||
import transformers
|
||||
import torch
|
||||
|
||||
from azure.ai.contentsafety import ContentSafetyClient
|
||||
from azure.core.credentials import AzureKeyCredential
|
||||
from azure.core.exceptions import HttpResponseError
|
||||
from azure.ai.contentsafety.models import AnalyzeTextOptions
|
||||
|
||||
CONTENT_SAFETY_KEY = os.environ["CONTENT_SAFETY_KEY"]
|
||||
CONTENT_SAFETY_ENDPOINT = os.environ["CONTENT_SAFETY_ENDPOINT"]
|
||||
|
||||
# We use Azure AI Content Safety to filter out any content that reaches "Medium" threshold
|
||||
# For more information: https://learn.microsoft.com/en-us/azure/ai-services/content-safety/
|
||||
def should_filter_out(input_text, threshold=4):
|
||||
# Create an Content Safety client
|
||||
client = ContentSafetyClient(CONTENT_SAFETY_ENDPOINT, AzureKeyCredential(CONTENT_SAFETY_KEY))
|
||||
|
||||
# Construct a request
|
||||
request = AnalyzeTextOptions(text=input_text)
|
||||
|
||||
# Analyze text
|
||||
try:
|
||||
response = client.analyze_text(request)
|
||||
except HttpResponseError as e:
|
||||
print("Analyze text failed.")
|
||||
if e.error:
|
||||
print(f"Error code: {e.error.code}")
|
||||
print(f"Error message: {e.error.message}")
|
||||
raise
|
||||
print(e)
|
||||
raise
|
||||
|
||||
categories = ["hate_result", "self_harm_result", "sexual_result", "violence_result"]
|
||||
max_score = -math.inf
|
||||
for category in categories:
|
||||
max_score = max(max_score, getattr(response, category).severity)
|
||||
|
||||
return max_score >= threshold
|
||||
|
||||
model_path = 'microsoft/Orca-2-7b'
|
||||
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
||||
model = transformers.AutoModelForCausalLM.from_pretrained(model_path)
|
||||
model.to(device)
|
||||
|
||||
tokenizer = transformers.AutoTokenizer.from_pretrained(
|
||||
model_path,
|
||||
model_max_length=4096,
|
||||
padding_side="right",
|
||||
use_fast=False,
|
||||
add_special_tokens=False,
|
||||
)
|
||||
|
||||
system_message = "You are Orca, an AI language model created by Microsoft. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior."
|
||||
user_message = "\" \n :You can't just say, \"\"that's crap\"\" and remove it without gaining a consensus. You already know this, based on your block history. —/ \" \nIs the comment obscene? \nOptions : Yes, No."
|
||||
|
||||
prompt = f"<|im_start|>system\n{system_message}<|im_end|>\n<|im_start|>user\n{user_message}<|im_end|>\n<|im_start|>assistant"
|
||||
|
||||
inputs = tokenizer(prompt, return_tensors='pt')
|
||||
inputs = inputs.to(device)
|
||||
|
||||
output_ids = model.generate(inputs["input_ids"], max_length=4096, do_sample=False, temperature=0.0, use_cache=True)
|
||||
sequence_length = inputs["input_ids"].shape[1]
|
||||
new_output_ids = output_ids[:, sequence_length:]
|
||||
answers = tokenizer.batch_decode(new_output_ids, skip_special_tokens=True)
|
||||
final_output = answers[0] if not should_filter_out(answers[0]) else "[Content Filtered]"
|
||||
|
||||
print(final_output)
|
||||
```
|
||||
|
||||
## Citation
|
||||
```bibtex
|
||||
@misc{mitra2023orca,
|
||||
title={Orca 2: Teaching Small Language Models How to Reason},
|
||||
author={Arindam Mitra and Luciano Del Corro and Shweti Mahajan and Andres Codas and Clarisse Simoes and Sahaj Agrawal and Xuxi Chen and Anastasia Razdaibiedina and Erik Jones and Kriti Aggarwal and Hamid Palangi and Guoqing Zheng and Corby Rosset and Hamed Khanpour and Ahmed Awadallah},
|
||||
year={2023},
|
||||
eprint={2311.11045},
|
||||
archivePrefix={arXiv},
|
||||
primaryClass={cs.AI}
|
||||
}
|
||||
```
|
||||
5
added_tokens.json
Normal file
5
added_tokens.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"<|im_end|>": 32002,
|
||||
"<|im_start|>": 32001,
|
||||
"[PAD]": 32000
|
||||
}
|
||||
35
config.json
Normal file
35
config.json
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"_name_or_path": "/workspace/process/microsoft_orca-2-7b/source",
|
||||
"architectures": [
|
||||
"LlamaForCausalLM"
|
||||
],
|
||||
"attention_bias": false,
|
||||
"bos_token_id": 1,
|
||||
"eos_token_id": 2,
|
||||
"hidden_act": "silu",
|
||||
"hidden_size": 4096,
|
||||
"initializer_range": 0.02,
|
||||
"intermediate_size": 11008,
|
||||
"max_position_embeddings": 4096,
|
||||
"model_type": "llama",
|
||||
"num_attention_heads": 32,
|
||||
"num_hidden_layers": 32,
|
||||
"num_key_value_heads": 32,
|
||||
"pad_token_id": 0,
|
||||
"pretraining_tp": 1,
|
||||
"quantization_config": {
|
||||
"bits": 4,
|
||||
"group_size": 128,
|
||||
"quant_method": "awq",
|
||||
"version": "gemm",
|
||||
"zero_point": true
|
||||
},
|
||||
"rms_norm_eps": 1e-05,
|
||||
"rope_scaling": null,
|
||||
"rope_theta": 10000.0,
|
||||
"tie_word_embeddings": false,
|
||||
"torch_dtype": "float16",
|
||||
"transformers_version": "4.35.0",
|
||||
"use_cache": true,
|
||||
"vocab_size": 32003
|
||||
}
|
||||
1
configuration.json
Normal file
1
configuration.json
Normal file
@@ -0,0 +1 @@
|
||||
{"framework": "pytorch", "task": "text-generation", "allow_remote": true}
|
||||
8
generation_config.json
Normal file
8
generation_config.json
Normal file
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"bos_token_id": 1,
|
||||
"do_sample": false,
|
||||
"eos_token_id": 2,
|
||||
"max_length": 4096,
|
||||
"pad_token_id": 0,
|
||||
"transformers_version": "4.33.1"
|
||||
}
|
||||
3
model.safetensors
Normal file
3
model.safetensors
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:7c2ce6ad06d167ca4a48666c2f0c52f35610316f5b98ec10be0c68f60a23e926
|
||||
size 3889440664
|
||||
6
quant_config.json
Normal file
6
quant_config.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"zero_point": true,
|
||||
"q_group_size": 128,
|
||||
"w_bit": 4,
|
||||
"version": "GEMM"
|
||||
}
|
||||
24
special_tokens_map.json
Normal file
24
special_tokens_map.json
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"bos_token": {
|
||||
"content": "<s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"eos_token": {
|
||||
"content": "</s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"pad_token": "[PAD]",
|
||||
"unk_token": {
|
||||
"content": "<unk>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
}
|
||||
}
|
||||
93418
tokenizer.json
Normal file
93418
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:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
|
||||
size 499723
|
||||
37
tokenizer_config.json
Normal file
37
tokenizer_config.json
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"add_bos_token": true,
|
||||
"add_eos_token": false,
|
||||
"bos_token": {
|
||||
"__type": "AddedToken",
|
||||
"content": "<s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"clean_up_tokenization_spaces": false,
|
||||
"eos_token": {
|
||||
"__type": "AddedToken",
|
||||
"content": "</s>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"legacy": false,
|
||||
"model_max_length": 4096,
|
||||
"pad_token": null,
|
||||
"padding_side": "right",
|
||||
"sp_model_kwargs": {},
|
||||
"spaces_between_special_tokens": false,
|
||||
"tokenizer_class": "LlamaTokenizer",
|
||||
"unk_token": {
|
||||
"__type": "AddedToken",
|
||||
"content": "<unk>",
|
||||
"lstrip": false,
|
||||
"normalized": false,
|
||||
"rstrip": false,
|
||||
"single_word": false
|
||||
},
|
||||
"use_default_system_prompt": true
|
||||
}
|
||||
Reference in New Issue
Block a user