Update metadata with huggingface_hub (#1)
- Update metadata with huggingface_hub (909e0cfb914b7d85ba95fc242ecc89e5a2cd7ae3) Co-authored-by: Vaibhav Srivastav <reach-vb@users.noreply.huggingface.co>
This commit is contained in:
12
README.md
12
README.md
@@ -1,10 +1,11 @@
|
||||
---
|
||||
license: apache-2.0
|
||||
license_link: https://huggingface.co/Qwen/Qwen2.5-14B-Instruct-AWQ/blob/main/LICENSE
|
||||
base_model: Qwen/Qwen2.5-14B-Instruct
|
||||
language:
|
||||
- en
|
||||
library_name: transformers
|
||||
license: apache-2.0
|
||||
license_link: https://huggingface.co/Qwen/Qwen2.5-14B-Instruct-AWQ/blob/main/LICENSE
|
||||
pipeline_tag: text-generation
|
||||
base_model: Qwen/Qwen2.5-14B-Instruct
|
||||
tags:
|
||||
- chat
|
||||
---
|
||||
@@ -49,8 +50,8 @@ Also check out our [AWQ documentation](https://qwen.readthedocs.io/en/latest/qua
|
||||
Here provides a code snippet with `apply_chat_template` to show you how to load the tokenizer and model and how to generate contents.
|
||||
|
||||
```python
|
||||
from modelscope import AutoModelForCausalLM, AutoTokenizer
|
||||
model_name = "qwen/Qwen2.5-14B-Instruct-AWQ"
|
||||
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||
model_name = "Qwen/Qwen2.5-14B-Instruct-AWQ"
|
||||
model = AutoModelForCausalLM.from_pretrained(
|
||||
model_name,
|
||||
torch_dtype="auto",
|
||||
@@ -76,7 +77,6 @@ generated_ids = [
|
||||
output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
|
||||
]
|
||||
response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
||||
print(response)
|
||||
```
|
||||
|
||||
### Processing Long Texts
|
||||
|
||||
Reference in New Issue
Block a user