Liang-Xingzheng
Liang-Xingzheng
root@liangzhiNLP:/home/liangzhi/liangxingzheng/multi-criteria-cws/multi-criteria-cws# ./script/train.sh joint-10in1 --dynet-seed 10364 --python-seed 840868838938890892 [dynet] random seed: 10364 [dynet] allocating memory: 512MB [dynet] memory allocation done. model.py --dataset dataset/joint-10in1/dataset.pkl --num-epochs 60 --word-embeddings data/embedding/character.vec --log-dir result/joint-10in1 --dropout 0.2...
in the model: def get_model(self): user_input = Input(shape=(1,), dtype='int32', name='user_input') item_input = Input(shape=(1,), dtype='int32', name='item_input') but in evaluate.py is: def _evaluate_one_rating(idx, k): ........ predictions = _model.predict([np.array(users_input), np.array(items_input)], batch_size=100 + 1,...
像base版本推理代码: >>> from transformers import AutoModelForCausalLM, AutoTokenizer >>> tokenizer = AutoTokenizer.from_pretrained("baichuan-inc/Baichuan2-13B-Base", trust_remote_code=True) >>> model = AutoModelForCausalLM.from_pretrained("baichuan-inc/Baichuan2-13B-Base", device_map="auto", trust_remote_code=True) >>> inputs = tokenizer('登鹳雀楼->王之涣\n夜雨寄北->', return_tensors='pt') >>> inputs = inputs.to('cuda:0') >>> pred =...
在测试Internvl-76B的时候,代码如下: `from vlmeval.config import supported_VLM model = supported_VLM['InternVL2-76B-sft']() ret = model.generate(['assets/apple.jpg', 'What is in this image?']) #前向单张图片 print(ret) # 这张图片上有一个带叶子的红苹果 ret = model.generate(['assets/apple.jpg', 'assets/apple.jpg', 'How many apples are there in...