chore: import upstream snapshot with attribution
Lint test / lint (push) Has been cancelled

This commit is contained in:
wehub-resource-sync
2026-07-13 13:34:58 +08:00
commit a203934033
1368 changed files with 175001 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
from swift.model import get_model_processor
if __name__ == '__main__':
# model, tokenizer = get_model_processor('Qwen/Qwen2-7B-Instruct', attn_impl='flash_attn')
# model, tokenizer = get_model_processor('AIDC-AI/Ovis2-2B', attn_impl='flash_attn')
# model, tokenizer = get_model_processor('OpenGVLab/InternVL2-2B', attn_impl='flash_attn')
model, tokenizer = get_model_processor('Shanghai_AI_Laboratory/internlm3-8b-instruct', attn_impl='flash_attn')
print(model)
+17
View File
@@ -0,0 +1,17 @@
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0,1'
os.environ['ASCEND_RT_VISIBLE_DEVICES'] = '0,1'
def test_llama3():
from swift import InferArguments, infer_main
infer_main(
InferArguments(
model='LLM-Research/Meta-Llama-3.1-8B-Instruct',
max_batch_size=2,
val_dataset='AI-ModelScope/alpaca-gpt4-data-en#2'))
if __name__ == '__main__':
test_llama3()
+19
View File
@@ -0,0 +1,19 @@
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
os.environ['ASCEND_RT_VISIBLE_DEVICES'] = '0'
def test_cogvlm():
from swift import InferArguments, SftArguments, infer_main, sft_main
# infer_main(InferArguments(model='ZhipuAI/cogvlm2-video-llama3-chat'))
sft_main(
SftArguments(
model='ZhipuAI/cogvlm2-video-llama3-chat',
dataset=['AI-ModelScope/alpaca-gpt4-data-zh#200', 'swift/VideoChatGPT:Generic#200'],
split_dataset_ratio=0.01))
if __name__ == '__main__':
test_cogvlm()