Skip to content

Commit

Permalink
change format
Browse files Browse the repository at this point in the history
  • Loading branch information
SiyunZhao committed Mar 26, 2024
1 parent 09a779f commit c394a79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions llmlingua/prompt_compressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
TokenClfDataset,
get_pure_token,
is_begin_of_new_word,
replace_added_token,
seed_everything,
process_structured_json_data,
remove_consecutive_commas,
replace_added_token,
seed_everything,
)


Expand Down Expand Up @@ -1279,7 +1279,6 @@ def sync_sentence(sentences, text):

sentences = [nltk.sent_tokenize(c) for c in context]
sentences = [sync_sentence(s, c) for s, c in zip(sentences, context)]
sentences = [sync_sentence(s, c) for s, c in zip(sentences, context)]
dem_g, s2de, idx = defaultdict(set), defaultdict(int), 0
for idx_d, s in enumerate(sentences):
for _ in s:
Expand Down
6 changes: 3 additions & 3 deletions llmlingua/utils.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import json
import os
import random
import string
import json
import re
import yaml
import string

import numpy as np
import torch
import yaml
from torch.utils.data import Dataset


Expand Down

0 comments on commit c394a79

Please sign in to comment.