Mryangkaitong
Mryangkaitong
请问在ChineseNRE/data/people-relation/data_util.py的54行 set_ids = range(1, len(set_words)+1) 那么“所有单词”列表的id索引是从1开始的,而在使用nn.Embedding时,取某个单词的vec索引是从索引0开始的,不就混乱了吗? 为什么不直接这样set_ids = range(len(set_words))写呢? 谢谢
I use trl for ppo training on my model (a seq2seq generation model). The PPOConfig is as follows. ` config = PPOConfig( model_name="/search/ai/kaitongyang/RLHF_DEBUG/PPO_trl/small_glm", learning_rate=1e-5, batch_size=32, ppo_epochs=3, log_with="wandb", init_kl_coef=0.3, remove_unused_columns=False, mini_batch_size=8...
预测结果有一个tensor id 是50035(词表是"vocab_size": 50048),但是tokenizer.decode([50035])会报错 `Traceback (most recent call last): File "test.py", line 18, in print(tokenizer.decode(cur_id)) File "/usr/local/lib/python3.8/site-packages/transformers/tokenization_utils_base.py", line 3471, in decode return self._decode( File "/usr/local/lib/python3.8/site-packages/transformers/tokenization_utils.py", line 931, in _decode filtered_tokens...
作者您好 ,请问下如果我想得到一个句对的向量该怎么使用当前的tokenizer呢?,类似bert的 [CLS] sent_A [SEP] sent_B; 看GLM的接口比较相关的是GLMForSequenceClassification(https://huggingface.co/THUDM/glm-10b-chinese/blob/main/modeling_glm.py#L920) 但是readme里面只有AutoModelForMultipleChoice和AutoModelForSeq2SeqLM的例子,即对应的是build_inputs_for_generation和build_inputs_for_multiple_choice 作者可以给个使用GLMForSequenceClassification的例子(tokenizer的编码类似build_inputs_for_classification)吗? 非常感谢
我的代码如下: `from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("THUDM/glm-10b-chinese", trust_remote_code=True) model = AutoModelForSeq2SeqLM.from_pretrained("THUDM/glm-10b-chinese", trust_remote_code=True) model = model.half().cuda() model.eval() prompt = """Human: 以下是中国关于high_school_chinese考试的单项选择题,请选出其中的正确答案。 下列各句中,没有语病的一项是____ A. 2019 年,“我太难了”突然成了网红金句,这句话蕴含着那么多的无奈、自嘲与顾影自怜,却又流露出大时代考验下不服输、不放弃的生动脸庞。 B. 金庸先生之所以在众多武侠作家中独具一格,高出一筹,是因为金庸的小说生长在中国传统土壤中,是“最中国”的小说的缘故。 C. 由网络小说改编影视剧,逐渐开启了与游戏、动漫的联动,为影视剧的跨产业传播提供了参考和经验,也为“国风汉韵”的跨产业传播提供了可能性。...
Excellent work!!! If I want to conduct full parameter training (non-lora) on llama2 13B now, where should I modify the code in stage1-stage3 to achieve the following two things: (1)...