Update README.md
Browse files
README.md
CHANGED
@@ -50,19 +50,19 @@ If you wish to use the original data, please contact the original author directl
|
|
50 |
def gen(x):
|
51 |
inputs = tokenizer(f"### μ§λ¬Έ: {x}\n\n### λ΅λ³:", return_tensors='pt', return_token_type_ids=False)
|
52 |
|
53 |
-
#
|
54 |
inputs = {k: v.to(device="cuda" if torch.cuda.is_available() else "cpu") for k, v in inputs.items()}
|
55 |
|
56 |
gened = model.generate(
|
57 |
**inputs,
|
58 |
-
max_new_tokens=256, #
|
59 |
early_stopping=True,
|
60 |
-
num_return_sequences=1, #
|
61 |
-
do_sample=True, #
|
62 |
-
eos_token_id=tokenizer.eos_token_id, # EOS
|
63 |
-
temperature=0.9, #
|
64 |
-
top_p=0.8, #
|
65 |
-
top_k=
|
66 |
)
|
67 |
|
68 |
# μμ±λ μνμ€λ₯Ό λμ½λνμ¬ μΆλ ₯ ν
μ€νΈλ‘ λ³ν
|
@@ -132,5 +132,4 @@ The copyright of the data used belongs to the original author, so please contact
|
|
132 |
|
133 |
> μ€μμνμ μν μ λν΄μ μ€λͺ
ν΄μ€λ?
|
134 |
|
135 |
-
>>
|
136 |
-
|
|
|
50 |
def gen(x):
|
51 |
inputs = tokenizer(f"### μ§λ¬Έ: {x}\n\n### λ΅λ³:", return_tensors='pt', return_token_type_ids=False)
|
52 |
|
53 |
+
# Move data to GPU (if available)
|
54 |
inputs = {k: v.to(device="cuda" if torch.cuda.is_available() else "cpu") for k, v in inputs.items()}
|
55 |
|
56 |
gened = model.generate(
|
57 |
**inputs,
|
58 |
+
max_new_tokens=256, # Maximum number of new tokens to create
|
59 |
early_stopping=True,
|
60 |
+
num_return_sequences=1, # Generate only one answer
|
61 |
+
do_sample=True, # Enable sampling to generate a variety of answers
|
62 |
+
eos_token_id=tokenizer.eos_token_id, # Using EOS Token IDs
|
63 |
+
temperature=0.9, # This option is adjustable.
|
64 |
+
top_p=0.8, # This option is adjustable.
|
65 |
+
top_k=100 # This option is adjustable.
|
66 |
)
|
67 |
|
68 |
# μμ±λ μνμ€λ₯Ό λμ½λνμ¬ μΆλ ₯ ν
μ€νΈλ‘ λ³ν
|
|
|
132 |
|
133 |
> μ€μμνμ μν μ λν΄μ μ€λͺ
ν΄μ€λ?
|
134 |
|
135 |
+
>> μ€μμνμ΄λ κ΅κ° λ° κ²½μ μ 체μ κ²½μ μμ λ° λ°μ μ λͺ©μ μΌλ‘ μ€λ¦½λ κΈμ΅κΈ°κ΄μΌλ‘, μ°λ¦¬λλΌμ κ²½μ° νκ΅μνμ΄λ€. μ€μμνμ κ΅κ°κΈμ΅ λ° μΈνμ μ€μΆμ μΈ κΈ°λ₯μ μννκ³ μμΌλ©°, κ·Έ κΆν λ° κΈ°λ₯μ μ€μμνλ²μμ κ·μ νκ³ μλ€.\n\n### λ§₯λ½: μ€μμνμ κ΅κ°κ° κ²½μ μμ λ° λ°μ μ λͺ©μ μΌλ‘ μ€λ¦½ν κΈμ΅κΈ°κ΄μ΄λ€. λ°λΌμ μ€μμνμ κ΅κ°μ κ²½μ λ₯Ό μμ μ μΌλ‘ κ΄λ¦¬νκ³ λ°μ μν€κΈ° μν΄ λ€μν κΈ°λ₯μ μννκ³ μλ€. ### μΆκ°μ 보: μ€μμνμ ν΅νμ μ±
, κΈμ΅μμ₯κ΄λ¦¬, κ΅μ κ²°μ , κ΅κ°μ¬μ κ΄λ¦¬ λ±μ κΈ°λ₯μ μννλ€. νΉν ν΅νμ μ±
μ μ€μμνμ κ°μ₯ μ€μν κΈ°λ₯μΌλ‘, ν΅νμ μ±
μ λ°©ν₯κ³Ό μμ€μ κ²½μ μ μμ μ± λ° λ°μ μ ν° μν₯μ λ―ΈμΉλ€.
|
|