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