Views
No views yet

md5sum ./*
29db882bdab3131ef05943ee8ba82e2c ./config.json.6375ff434583e14cfc1fd45f9f599ddb9c689cb9b8c542d427dc6d5dc1059037.enc
f9b33d359f17a437f6c24b4de6f2272e ./generation_config.json.fd7ff399e5568cc21a0a8414f43df88ef7c424995b9b97a90563165d2cf79efd.enc
794e28fff16ef8c3fe9e48e3aa6ccf3a ./pytorch_model-00001-of-00002.bin.b552ebc4dd499812cfe1e45ffcaad0ee93851ef83df95eb4f824be53b25e5531.enc
1ab136a4489016c3004e3f04c438f268 ./pytorch_model-00002-of-00002.bin.45adb5c7b91f81b2c03c913f2e52487a0e22663e088063b699c6a903101b7968.enc
0d6db7f247a51589f3dd6d08dbfe64ce ./pytorch_model.bin.index.json.4f08b269e18619675bc3fd62f6efb3a8d59f9d54fa50f5625d0bba7adabaf90e.enc
34696bfce7b27548cfc2410e2b55762e ./special_tokens_map.json.96bdbb8504d9967606e5f661ccc7cbbac44a3661af863a7a58614670a0ccab33.enc
6014cf2235521f974c8d9fb69b6cf07e ./tokenizer_config.json.7078cc180b3d35e7ccd06b49ede4a7fef85f2572bda40c1fe2fc8f9ab25418d3.enc
56724a79091f3d1877cca65c6412d646 ./tokenizer.model.0b716a618c9e7c45648f91d997431eba3b0ff111b17ce7b777280ed771a49f95.enc1mkdir /path/to_finetuned_model
2for f in "/path/to_encrypted"/*; \
3 do if [ -f "$f" ]; then \
4 python3 decrypt.py "$f" "/path/to_original_llama_7B/consolidated.00.pth" "/path/to_finetuned_model/"; \
5 fi; \
6done./config.json
./generation_config.json
./pytorch_model-00001-of-00002.bin
./pytorch_model-00002-of-00002.bin
./pytorch_model.bin.index.json
./special_tokens_map.json
./tokenizer_config.json
./tokenizer.modelmd5sum ./*
139cb9dc0065bd878b277860c70add74 ./config.json
2917a1cafb895cf57e746cfd7696bfe5 ./generation_config.json
2f6cce3296b6bfeb8beb1629bf07dfe9 ./pytorch_model-00001-of-00002.bin
8fe5b4ad70788b3a6086ef28709a8730 ./pytorch_model-00002-of-00002.bin
e5385004e4876ea6b93d6126e845a82f ./pytorch_model.bin.index.json
15f7a943faa91a794f38dd81a212cb01 ./special_tokens_map.json
08f6f621dba90b2a23c6f9f7af974621 ./tokenizer_config.json
6ffe559392973a92ea28032add2a8494 ./tokenizer.modelHuman: {input} \n\nAssistant:pip install git+https://github.com/huggingface/transformers1from transformers import LlamaForCausalLM, AutoTokenizer
2import torch
3
4ckpt = '/path/to_finetuned_model/'
5device = torch.device('cuda')
6model = LlamaForCausalLM.from_pretrained(ckpt, device_map='auto', low_cpu_mem_usage=True)
7tokenizer = AutoTokenizer.from_pretrained(ckpt)
8prompt = "Human: 写一首中文歌曲,赞美大自然 \n\nAssistant: "
9input_ids = tokenizer(prompt, return_tensors="pt").input_ids.to(device)
10generate_ids = model.generate(input_ids, max_new_tokens=300, do_sample = True, top_k = 30, top_p = 0.85, temperature = 0.5,repetition_penalty=1.2, eos_token_id=2, bos_token_id=1, pad_token_id=0)
11output = tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
12response = output[len(prompt):]
13print(response)
14@misc{ji2023better,
title={Towards Better Instruction Following Language Models for Chinese: Investigating the Impact of Training Data and Evaluation},
author={Yunjie Ji and Yan Gong and Yong Deng and Yiping Peng and Qiang Niu and Baochang Ma and Xiangang Li},
year={2023},
eprint={2304.07854},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
@misc{BELLE,
author = {BELLEGroup},
title = {BELLE: Be Everyone's Large Language model Engine},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/LianjiaTech/BELLE}},
}