Update README.md
Browse files
README.md
CHANGED
@@ -95,7 +95,8 @@ print(text_to_anonymize)
|
|
95 |
# Step 1: Extracting entities from text
|
96 |
prompt = f'USER: Resample the entities: {text_to_anonymize}\n\nASSISTANT:'
|
97 |
inputs = tokenizer(prompt, return_tensors='pt').to('cuda:0')
|
98 |
-
output_entities = model.generate(inputs.input_ids, max_new_tokens=
|
|
|
99 |
raw_output_entities_text = tokenizer.decode(output_entities[0])
|
100 |
entities = extract_last_assistant_response(raw_output_entities_text)
|
101 |
|
|
|
95 |
# Step 1: Extracting entities from text
|
96 |
prompt = f'USER: Resample the entities: {text_to_anonymize}\n\nASSISTANT:'
|
97 |
inputs = tokenizer(prompt, return_tensors='pt').to('cuda:0')
|
98 |
+
output_entities = model.generate(inputs.input_ids, max_new_tokens=300, do_sample=False, temperature=0.8, penalty_alpha=1.3, top_k=180, num_beams=5, repetition_penalty=2.3)
|
99 |
+
|
100 |
raw_output_entities_text = tokenizer.decode(output_entities[0])
|
101 |
entities = extract_last_assistant_response(raw_output_entities_text)
|
102 |
|