From 22a88a22d3daf780bec089a05ae0dcbada3225cb Mon Sep 17 00:00:00 2001 From: ai-modelscope Date: Thu, 27 Feb 2025 01:08:53 +0800 Subject: [PATCH] Update metadata with huggingface_hub (#1) - Update metadata with huggingface_hub (909e0cfb914b7d85ba95fc242ecc89e5a2cd7ae3) Co-authored-by: Vaibhav Srivastav --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9637118..6f5d2bb 100644 --- a/README.md +++ b/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