SusumuDou commited on
Commit
3555595
·
verified ·
1 Parent(s): 679b8f0

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -8
README.md CHANGED
@@ -45,8 +45,7 @@ FastLanguageModel.for_inference(model)
45
 
46
   入力ファイル:LLM_2024/最終課題/elyza-tasks-100-TV_0.jsonl
47
 
48
- (1) モデルに推論させる入力ファイルの読み込み
49
-   コードは以下の通りです。 
50
 
51
  datasets = []
52
  with open("/content/drive/MyDrive/LLM_2024/最終課題/elyza-tasks-100-TV_0.jsonl", "r") as f:
@@ -65,8 +64,7 @@ FastLanguageModel.for_inference(model)
65
 
66
  item = ""
67
 
68
- (2) 推論
69
-   コードは以下の通りです。
70
 
71
  results = []
72
 
@@ -84,10 +82,8 @@ for dt in tqdm(datasets):
84
 
85
  results.append({"task_id": dt["task_id"], "input": input, "output": prediction})
86
 
87
- (3) 推論結果output.jsonlの出力
88
 
89
-   コードは以下の通りです。
90
-
91
  with open(f"output.jsonl", 'w', encoding='utf-8') as f:
92
 
93
  for result in results:
@@ -95,5 +91,4 @@ with open(f"output.jsonl", 'w', encoding='utf-8') as f:
95
  json.dump(result, f, ensure_ascii=False)
96
 
97
  f.write('\n')
98
-
99
 
 
45
 
46
   入力ファイル:LLM_2024/最終課題/elyza-tasks-100-TV_0.jsonl
47
 
48
+ (1) モデルに推論させる入力ファイルの読み込みコード
 
49
 
50
  datasets = []
51
  with open("/content/drive/MyDrive/LLM_2024/最終課題/elyza-tasks-100-TV_0.jsonl", "r") as f:
 
64
 
65
  item = ""
66
 
67
+ (2) 推論コード
 
68
 
69
  results = []
70
 
 
82
 
83
  results.append({"task_id": dt["task_id"], "input": input, "output": prediction})
84
 
85
+ (3) 推論結果output.jsonlの出力コード
86
 
 
 
87
  with open(f"output.jsonl", 'w', encoding='utf-8') as f:
88
 
89
  for result in results:
 
91
  json.dump(result, f, ensure_ascii=False)
92
 
93
  f.write('\n')
 
94