|
Download README.md from YAI777/LLMlec-FinalAssignment_YAI: direct link, hf CLI and curl.
- Browser
- Download file 1.32 kB
-
https://huggingface.co/YAI777/LLMlec-FinalAssignment_YAI/resolve/main/README.md
- Command line
-
hf download hf://YAI777/LLMlec-FinalAssignment_YAI/README.md
-
curl -L -o README.md https://huggingface.co/YAI777/LLMlec-FinalAssignment_YAI/resolve/main/README.md
1.32 kB
| license: cc-by-nc-sa-4.0 | |
| base_model: | |
| - llm-jp/llm-jp-3-13b | |
| ## モデルのロードと推論 | |
| ### Pythonスクリプト例 | |
| ```python | |
| from tqdm import tqdm | |
| results = [] | |
| for data in tqdm(datasets): | |
| input = data["input"] | |
| prompt = f"""### 指示 | |
| {input} | |
| ### 回答 | |
| """ | |
| tokenized_input = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt").to(model.device) | |
| attention_mask = torch.ones_like(tokenized_input) | |
| with torch.no_grad(): | |
| outputs = model.generate( | |
| tokenized_input, | |
| attention_mask=attention_mask, | |
| max_new_tokens=100, | |
| do_sample=False, | |
| repetition_penalty=1.2, | |
| pad_token_id=tokenizer.eos_token_id | |
| )[0] | |
| output = tokenizer.decode(outputs[tokenized_input.size(1):], skip_special_tokens=True) | |
| results.append({"task_id": data["task_id"], "input": input, "output": output}) | |
| ## 引用情報 | |
| モデル元データセット: | |
| - 関根聡, 安藤まや, 後藤美知子, 鈴木久美, 河原大輔, 井之上直也, 乾健太郎. | |
| - "ichikara-instruction: LLMのための日本語インストラクションデータの構築" | |
| - 言語処理学会第30回年次大会 (2024) | |
| ## モデルの情報 | |
| - 開発者情報: YAI | |
| - ライセンス: cc-by-nc-sa-4.0 | |
| - Finetuned from model : llm-jp/llm-jp-3-13b | |