mvitlov / tiktoken

tiktoken is a BPE tokeniser for use with OpenAI's models
Other
23 stars 7 forks source link

Makes the XCode Archive time 10 times longer. #5

Open farmer00317558 opened 1 year ago

farmer00317558 commented 1 year ago

Hi, thanks for your work on this library.

I found that this library makes the XCode Archive time 60 times longer than before. Before I used this library, it took 40s to archive my application(an macOs application), but now it takes 40 minutes.

jokimina commented 1 year ago
image

same here

JerryFans commented 1 year ago

I have the same problem too in latest 1.0.3 . It archive time 40 minute. (Before is about 1minute)。

alvin-7 commented 1 year ago

I have the same problem too in latest 1.0.3 . It archive time 40 minute. (Before is about 1minute)。

me too

JerryFans commented 1 year ago

Also can use my copy packages to fix this issue. https://github.com/JerryFans/flutter_tiktoken. And is Published to flutter pub.

terryokay commented 1 year ago

Also can use my copy packages to fix this issue. https://github.com/JerryFans/flutter_tiktoken. And is Published to flutter pub.

This Helped me. Thanks a lot.

trevorwang commented 1 year ago

@JerryFans Could you explain the root cause for increasing building time?

JerryFans commented 1 year ago

@JerryFans Could you explain the root cause for increasing building time?

In the past, there were four final map inside to match tokens usage, each with more than 100,000 lines of keys. Resulting in very slow compilation. I split the four map into dozens of small json files (In order to prevent oom), and initialized the json into the original map in the main function and can fix this issue.

trevorwang commented 1 year ago

Got it. Thanks for the explanation. @JerryFans

davidmigloz commented 1 year ago

Thanks for suggesting a fix @JerryFans. It would be nice if you can issue a PR with the fix in this repository so that @mvitlov can release it.

JerryFans commented 1 year ago

Ok, I'll submit a PR later.

tinaroh commented 1 year ago

Hi, curious if the fix by Jerry would be accepted?