metricv commited on
Commit
f752c8d
1 Parent(s): 089eba0

New data and scripts

Browse files
ass_extract.ipynb DELETED
@@ -1,90 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": 1,
6
- "metadata": {},
7
- "outputs": [],
8
- "source": [
9
- "import ass\n",
10
- "import os"
11
- ]
12
- },
13
- {
14
- "cell_type": "code",
15
- "execution_count": 6,
16
- "metadata": {},
17
- "outputs": [],
18
- "source": [
19
- "SUB_NAME = \"2023-10-25 Windows' Apple Silicon Moment is Coming [xFvGERpRUpM].ass\""
20
- ]
21
- },
22
- {
23
- "cell_type": "code",
24
- "execution_count": 7,
25
- "metadata": {},
26
- "outputs": [],
27
- "source": [
28
- "cn_name = \"Extracted - \" + os.path.splitext(SUB_NAME)[0] + \".cn.txt\"\n",
29
- "en_name = \"Extracted - \" + os.path.splitext(SUB_NAME)[0] + \".en.txt\""
30
- ]
31
- },
32
- {
33
- "cell_type": "code",
34
- "execution_count": 8,
35
- "metadata": {},
36
- "outputs": [],
37
- "source": [
38
- "with open(SUB_NAME, \"r\", encoding='utf-8-sig') as f:\n",
39
- " doc = ass.parse(f)"
40
- ]
41
- },
42
- {
43
- "cell_type": "code",
44
- "execution_count": 9,
45
- "metadata": {},
46
- "outputs": [],
47
- "source": [
48
- "cn_file = open(cn_name, \"w\")\n",
49
- "en_file = open(en_name, \"w\")\n",
50
- "\n",
51
- "for e in doc.events:\n",
52
- " if e.style == '英':\n",
53
- " en_file.write(f\"[{e.start.total_seconds()}] {e.text.strip()} [{e.end.total_seconds()}]\\n\")\n",
54
- " elif e.style == '中':\n",
55
- " cn_file.write(f\"[{e.start.total_seconds()}] {e.text.strip()} [{e.end.total_seconds()}]\\n\")\n",
56
- "\n",
57
- "cn_file.close()\n",
58
- "en_file.close()"
59
- ]
60
- },
61
- {
62
- "cell_type": "code",
63
- "execution_count": null,
64
- "metadata": {},
65
- "outputs": [],
66
- "source": []
67
- }
68
- ],
69
- "metadata": {
70
- "kernelspec": {
71
- "display_name": "whisper",
72
- "language": "python",
73
- "name": "python3"
74
- },
75
- "language_info": {
76
- "codemirror_mode": {
77
- "name": "ipython",
78
- "version": 3
79
- },
80
- "file_extension": ".py",
81
- "mimetype": "text/x-python",
82
- "name": "python",
83
- "nbconvert_exporter": "python",
84
- "pygments_lexer": "ipython3",
85
- "version": "3.10.13"
86
- }
87
- },
88
- "nbformat": 4,
89
- "nbformat_minor": 2
90
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ass_extract.py ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import ass
2
+ import os
3
+ import sys
4
+
5
+ SUB_NAME = sys.argv[1]
6
+
7
+ cn_name = "Extracted - " + os.path.splitext(SUB_NAME)[0] + ".cn.txt"
8
+ en_name = "Extracted - " + os.path.splitext(SUB_NAME)[0] + ".en.txt"
9
+
10
+ with open(SUB_NAME, "r", encoding='utf-8-sig') as f:
11
+ doc = ass.parse(f)
12
+
13
+ cn_file = open(cn_name, "w")
14
+ en_file = open(en_name, "w")
15
+
16
+ for e in doc.events:
17
+ if e.style == '英':
18
+ en_file.write(f"[{e.start.total_seconds()}] {e.text.strip()} [{e.end.total_seconds()}]\n")
19
+ elif e.style == '中':
20
+ cn_file.write(f"[{e.start.total_seconds()}] {e.text.strip()} [{e.end.total_seconds()}]\n")
21
+
22
+ cn_file.close()
23
+ en_file.close()
chatgpt-recent-test.jsonl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:dfa03d5d56228528cb8858e5745a09ef245a711a991801ecbe6df49dc61213f8
3
- size 66253
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8c721a96f67922048c259225c859fae383021412513bbe299f38e86d103a0ebf
3
+ size 61114
chatgpt-recent-train.jsonl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8f96b1cbe7a65c9fe1b0ba02eff14823428c9b96f58cf0e68518919bd5055477
3
- size 269032
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ac5a43f261f248c2767ead6cb3a779a44366c38832648ed7ab6cccbede8f2ed7
3
+ size 273326
chatgpt-test.jsonl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3c95e22b1989640da79ffda2446cb6b199485fd220e71bfa289cdbdd9d7d38c6
3
- size 136957
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4b47b5bf70383550041c1502437cedfd19e7927980e76eead28f9a92887e07f0
3
+ size 148931
chatgpt-train.jsonl CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:bd2d9dc5501adf649acaa455e8cbc5289733fdda4aa8735af63623be06b58772
3
- size 576377
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6922bb916006ab705c7e83d0beda277afe23ee832e1380e59a5d1a777655ff8b
3
+ size 621613
data/2023-10-25 Windows' Apple Silicon Moment is Coming [xFvGERpRUpM].cn.txt CHANGED
@@ -100,7 +100,7 @@
100
  [290.66] 因为 大并不一定就是好 [292.42]
101
  [293.04] 适合任何场合 尤其是狭小空间 [295.24]
102
  [295.5] 小短粗能完美适配 [296.82]
103
- [296.82] 棘轮机构让拧螺丝变得更♂有♀乐趣 [300.06]
104
  [300.68] 哦 Dennis [301.52]
105
  [302.06] 只用两根手指 你就可以轻松拧紧螺丝 [304.54]
106
  [304.68] 你可以把小短粗放在任何地方 [306.26]
 
100
  [290.66] 因为 大并不一定就是好 [292.42]
101
  [293.04] 适合任何场合 尤其是狭小空间 [295.24]
102
  [295.5] 小短粗能完美适配 [296.82]
103
+ [296.82] 棘轮机构让拧螺丝变得更有乐趣 [300.06]
104
  [300.68] 哦 Dennis [301.52]
105
  [302.06] 只用两根手指 你就可以轻松拧紧螺丝 [304.54]
106
  [304.68] 你可以把小短粗放在任何地方 [306.26]
data/2023-11-06 Grok [rCmsoa2Zlhg].cn.txt CHANGED
@@ -1,5 +1,5 @@
1
  [0.44] 新的一周 新的科技新闻 [3.08]
2
- [3.08] 说来~ [3.36]
3
  [3.58] 这让我想起了我在计科系学的一首歌 [6.18]
4
  [6.78] 哗~开关一拨它就嗖~ [9.38]
5
  [9.38] 埃隆·马斯克的人工智能公司 嗯 还能叫什么呢 [12.14]
 
1
  [0.44] 新的一周 新的科技新闻 [3.08]
2
+ [3.08] 说来 [3.36]
3
  [3.58] 这让我想起了我在计科系学的一首歌 [6.18]
4
  [6.78] 哗~开关一拨它就嗖~ [9.38]
5
  [9.38] 埃隆·马斯克的人工智能公司 嗯 还能叫什么呢 [12.14]
data/2023-11-13 The EU Will Break Apple. [Hod69Y1aVlY].cn.txt ADDED
@@ -0,0 +1,152 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [0.0] 啊 您来这里是想看科技新闻 [3.76]
2
+ [3.96] 我明白的 [5.4]
3
+ [5.92] 所以我已经准备好了 [10.66]
4
+ [10.66] 就在这儿 稍等 [12.42]
5
+ [12.84] 苹果不希望iPhone用户 [16.06]
6
+ [16.06] 从Appstore之外的地方下载安装应用 [18.12]
7
+ [18.12] 也就是俗称的"通过外部源安装" [19.54]
8
+ [19.54] 但根据Mark Gurman的报道 该公司似乎 [23.84]
9
+
10
+ [23.84] 好像是正戴着痛苦面具 咬牙切齿地准备纹一个临时文身 [31.34]
11
+ [31.64] 因为欧盟的《数字市场法》规定 谷歌、苹果等守门平台公司 [37.33]
12
+ [37.33] 必须在2024年3月前 开放其软件生态系统 [40.82]
13
+ [41.36] Gurman还说 苹果的财报以及在iOS 17.2 beta版中发现的代码 [47.44]
14
+ [47.44] 都表明苹果正准备在截止日期前 几个月内 允许iPhone侧加载应用 [54.22]
15
+
16
+ [54.66] 但是 与他们在iPhone上推出USB-C的做法不同 [57.54]
17
+ [58.4] 同样也是因为受到了欧盟的压力 [60.18]
18
+ [60.4] 但侧加载可能只会在欧盟内部开放 [64.1]
19
+ [64.38] 但是虽然苹果准备做出这一惊天壮举 [67.42]
20
+ [67.42] 让他们的用户为自己做决定 [72.22]
21
+ [72.54] 这家万亿美元的公司据报道还在悄悄筹谋绝地反击 提起数项上诉 [79.02]
22
+ [79.26] 挑战欧盟将iOS应用商店和iMessage 定性为守门类服务的决定 [85.3]
23
+ [86.04] 苹果并不认为自己在守门式地管控什么 [89.0]
24
+
25
+ [89.0] 如果他们真有 也顶多算是霸道总裁的那种溺爱 [92.66]
26
+ [92.98] 就像是哇姐妹你说的好对 [94.6]
27
+ [95.02] 什么建设性建议 都是假的 [96.9]
28
+ [97.36] 总之 [97.64]
29
+ [97.64] 准备为你使用iPhone的朋友们 提供更高级的技术支持吧 [101.44]
30
+ [101.7] 苹果的其他相关新闻 [102.6]
31
+ [102.6] 关于该公司底配M3 MacBook Pro 内存只有8G的担忧 [109.16]
32
+ [109.16] 抱歉 [109.62]
33
+
34
+ [110.14] 应该是“统一内存” [111.02]
35
+ [111.22] 这些担忧被博主Max Tech的实验 一定程度地证实了 [114.78]
36
+ [115.04] 他让一台8GB内存和一台16GB内存的M3 MacBook Pro进行了对比 [119.0]
37
+ [119.0] 并且发现 毫不意外地 [122.44]
38
+ [122.44] 16G版笔记本的性能几乎吊打8G版 [127.74]
39
+ [127.74] 导出照片和视频的速度提升多达3倍 [131.32]
40
+ [131.32] 尽管它只有前者两倍的容量 [134.16]
41
+ [134.92] 现在 [135.12]
42
+
43
+ [135.12] 果粉只会对苹果的低能MacBook Pro更加失望 [140.52]
44
+ [140.52] 尤其是在得知该公司的全球市场营销副总裁Bob Borchers [144.66]
45
+ [145.0] 对着Bilibili UP主林亦LYi狺狺狂吠之后 [150.52]
46
+ [151.2] 说什么M3 MacBook Pro 上的8GB RAM [153.96]
47
+ [153.96] 相当于其他系统上的16GB RAM [158.32]
48
+ [158.6] 现在 [159.0]
49
+ [159.0] 你可以承认 苹果的软硬件优化是高科技 [163.82]
50
+ [163.82] 但当你听到Borchers的发言时 你也可以庆幸自己在没喝2%的脱脂牛奶 [168.96]
51
+ [169.18] 我一天内换裤子的次数已经够多了 好吧? [172.58]
52
+
53
+ [172.92] 但嘿 这回至少苹果用了两个单独的固态存储模块 [177.62]
54
+ [178.14] 不是因为大家要求他们做的 [179.86]
55
+ [179.86] 他们才不在乎呢 [182.18]
56
+ [182.7] 英特尔一直在等机会 因为一些不知所谓的事情被报道 [185.72]
57
+ [185.72] 所以谢天谢地MSI发布了一个BIOS更新 [188.84]
58
+ [188.84] 使其的Z790系列主板支持 [191.78]
59
+ [191.78] 名字听上去非常盗版的英特尔应用优化功能 简称APO [197.66]
60
+ [197.66] 这个功能实际上挺不错的 [200.14]
61
+ [200.14] Hardware Unboxed在他们更新了的MSI主板上进行了一些测试 [203.44]
62
+
63
+ [203.44] 并认为APO修复了英特尔E效能核心 处理游戏的方式 [209.64]
64
+ [209.9] 但尽管听上去 这应该适用于几乎所有包含E核心的芯片 [215.06]
65
+ [215.06] 比如12代和13代系列 [217.4]
66
+ [217.72] APO只适用于部分14代酷睿处理器 [221.64]
67
+ [221.92] 当Hardware Unboxed询问英特尔 这是怎么回事时 [225.5]
68
+ [225.92] 英特尔回了一句让人血寒的公司豪言 [228.7]
69
+ [229.42] "英特尔APO没有计划支持更早的产品" [233.88]
70
+ [234.38] 喂? [234.64]
71
+
72
+ [234.98] 我是个人啊 [236.28]
73
+ [236.44] 我有情绪的 [237.44]
74
+ [237.7] 嗡嗡 嗡嗡 [238.48]
75
+ [239.0] Hardware Unboxed还问Intel [240.22]
76
+ [240.22] 是否计划支持更多能兼容APO的游戏 现在只有两款 [244.82]
77
+ [245.14] 现在只有《地铁:离去》和《彩虹六号:围攻》支持 [247.08]
78
+ [247.08] 对此 英特尔回答 “有可能” [250.26]
79
+
80
+ [289.02] 科技速递伙计 他们 很酷的 你懂的 [292.54]
81
+ [292.54] 今天我有点匆忙 [293.34]
82
+ [293.34] 没时间想什么牛X的 [294.86]
83
+ [294.86] 好吧 [295.2]
84
+ [295.2] NVIDIA发布了H200 [297.02]
85
+ [297.02] H100的升级版 [299.0]
86
+ [299.92] 因为当下的AI热潮供不应求 也许美元不久之后就会跟它挂钩 [305.4]
87
+ [305.4] H200 GPU的规格似乎与H100基本相似 [309.46]
88
+ [309.66] 除了显存 [311.08]
89
+
90
+ [311.08] 从HBM3升级到了HBM3e [314.78]
91
+ [314.78] 提高了显存的带宽 以及频率和容量 [317.56]
92
+ [317.82] H100有80GB的显存 [320.26]
93
+ [320.26] 而H200有141GB [322.98]
94
+ [323.26] 想想看 你可以用它做很多事 [325.44]
95
+ [325.44] 比如模拟8.88GB的M3 MacBook Pro [329.6]
96
+ [329.84] 是的 [330.72]
97
+ [330.72] 你自己算去吧 [331.66]
98
+ [331.66] RTX 4090仍然因为融化电源接头的问题堆满了维修店 [335.96]
99
+
100
+ [335.96] 在该显卡12V接头的问题被报导一年多后仍旧如此 [341.1]
101
+ [341.44] 根据YouTube频道Northridge Fix的Alex的说法 [344.36]
102
+ [344.36] 他说他的修理店每周仍然会收到大约20到25台RTX 4090 [349.48]
103
+ [349.88] 这一次次地证明 4090的机主们 [352.36]
104
+ [352.36] 只是没有正确地插上电源而已 你只需用力推到底 [356.08]
105
+ [356.08] 那是你的锅 [356.78]
106
+ [357.0] 值得庆幸的是 [357.42]
107
+
108
+ [357.42] PCI SIG现已对接头进行了重新设计 [360.14]
109
+ [360.14] 所以希望未来犹豫着的割手党 [364.18]
110
+ [364.18] 不用承受你们现在的痛苦 [366.18]
111
+ [366.4] 其实那并不是你的锅 [367.94]
112
+ [367.94] 我只是开个玩笑 [368.56]
113
+ [368.56] 别写毒评论了 [369.78]
114
+ [370.14] 三天前的网络攻击已经结束 澳大利亚的港口重新开放 [375.68]
115
+ [375.86] 根据DP World Australia的说法 [377.78]
116
+ [377.98] 跟你刚想的那个不沾边 [380.62]
117
+ [380.62] 它实际上是澳大利亚最大的港口运营商 [383.34]
118
+
119
+ [383.66] 听起来还是挺… [386.04]
120
+ [386.04] 淦 [386.5]
121
+ [387.0] 此次网络攻击导致严重拥堵 且一些数据据称已被攻击者窃取 [391.86]
122
+ [391.86] 攻击者被认为是受境外势力指使 [394.36]
123
+ [394.68] 但我想他们应该看看 船头是不是炸了 [397.58]
124
+ [397.58] 故障频出的闪迪 Extreme Pro SSD [400.99]
125
+ [400.99] 是无法通过任何固件更新修复的硬件问题 [405.32]
126
+ [405.52] 根据数据恢复公司Atingo的说法 [408.36]
127
+ [408.36] 该公司的总经理告诉Futurezone 一些元件 [411.9]
128
+ [411.9] 对于电路板来说 太大了 [415.1]
129
+
130
+ [415.1] 这导致连接不稳定 [416.58]
131
+ [417.0] 从而造成一些元件完全从电路板上掉了下来 [420.16]
132
+ [420.38] 而且不是以好的方式 [421.68]
133
+ [421.68] 我肯定会十分惊讶 直到我记起来Sandisk是WD的子公司 [427.48]
134
+ [427.48] 而特斯拉Cybertruck的订购协议禁止车主 [431.81]
135
+ [431.81] 在交付后一年内出售这辆多边形车 [436.64]
136
+ [437.04] 除非你告诉特斯拉你想卖 并给他们回购的机会 [441.58]
137
+ [441.58] 如果他们不想回购的话 [443.56]
138
+ [443.56] 他们可能会给你书面许可 [445.52]
139
+ [445.52] 转手卖给第三方 [446.86]
140
+
141
+ [447.12] 像是什么特许执照 [447.86]
142
+ [448.02] 但为的是应得的基本经济权利 [449.72]
143
+ [449.72] 如果违反了协议的任何条款 [453.12]
144
+ [453.48] 特斯拉称他们可以通过定位并远程停用车辆 [457.28]
145
+ [457.7] 而且说实话 如果你购买了Cybertruck 这些听起来都很说得过去 [461.16]
146
+ [461.52] 它不是一辆普通的皮卡 [462.62]
147
+ [463.14] 它是... [464.02]
148
+
149
+ [464.02] 它...很丑 [465.46]
150
+ [465.46] 但是你内外都很美 你知道的 所以我知道你会在周三回来看科技新闻的 [470.26]
151
+ [470.26] 这是你的风格 你懂吗 我们喜欢你这样 [473.24]
152
+ [473.24] 拜托了 [473.7]
data/2023-11-13 The EU Will Break Apple. [Hod69Y1aVlY].en.txt ADDED
@@ -0,0 +1,172 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [0.0] Uh, [0.48]
2
+ [0.48] you came here because you want tech news, [3.76]
3
+ [3.96] and I know that. [5.4]
4
+ [5.92] And that's why I have that ready for, [9.16]
5
+ [9.16] I have it ready for you right here. [10.66]
6
+ [10.66] It's just, one second. [12.42]
7
+ [12.84] Apple doesn't want to allow iPhone users [16.06]
8
+ [16.06] to install apps from outside of the app store, [18.12]
9
+ [18.12] AKA side loading, [19.54]
10
+ [19.54] but according to Mark Gurm's together strong Gurman, [23.06]
11
+ [23.06] the company looks [23.84]
12
+
13
+ [23.84] like it's doing the tech giant equivalent [25.64]
14
+ [25.64] of gritting its teeth and wincing in anticipation [28.62]
15
+ [29.0] of getting a very painful temporary tattoo. [31.34]
16
+ [31.64] See, the EU's Digital Market Act requires gatekeeper companies like Google and Apple [37.33]
17
+ [37.33] to open up their software ecosystems by March, 2024. [40.82]
18
+ [41.36] The Gurman, financial filings from Apple, [43.9]
19
+ [43.9] as well as code found in the iOS 17.2 beta, [47.44]
20
+ [47.44] all point to Apple preparing to allow side loading on iPhones before that deadline, [52.8]
21
+ [52.8] so in the next few months. [54.22]
22
+
23
+ [54.66] However, unlike their rollout of USB-C on iPhones, [57.54]
24
+ [58.4] which happened because of EU pressure, [60.18]
25
+ [60.4] side loading may only be allowed in the EU itself. [64.1]
26
+ [64.38] But while Apple is preparing to do the unthinkable, [67.42]
27
+ [67.42] letting their users decide something for themselves, [72.22]
28
+ [72.54] the trillion dollar company is reportedly also quietly cooking up a Hail Mary in the form of several appeals, [79.02]
29
+ [79.26] challenging the EU's decision to label the iOS app store and iMessage as gatekeeper services. [85.3]
30
+ [86.04] Apple doesn't think of itself as gatekeeping anything. [89.0]
31
+
32
+ [89.0] And if they are, it's more like a girl boss gaslight situation. [92.66]
33
+ [92.98] Like, wow, yes, queen. [94.6]
34
+ [95.02] Constructive criticism isn't real. [96.9]
35
+ [97.36] Anyway, [97.64]
36
+ [97.64] get ready to provide a whole new level of tech support for your iPhone using friends. [101.44]
37
+ [101.7] In other Apple news, [102.6]
38
+ [102.6] concerns over the company's decision [104.16]
39
+ [104.16] to limit the base model M3 MacBook Pro to eight gigabytes of RAM, [109.16]
40
+ [109.16] sorry, [109.62]
41
+
42
+ [110.14] unified memory, [111.02]
43
+ [111.22] have been somewhat validated, [112.8]
44
+ [112.8] according to YouTuber Max Tech. [114.78]
45
+ [115.04] He put an eight gigabyte and a 16 gigabyte M3 MacBook Pro head to head, [119.0]
46
+ [119.0] and found that, [119.96]
47
+ [119.96] unsurprising to nearly everyone, [122.44]
48
+ [122.44] the 16 gigabyte laptop enjoys a sizable performance boost over the eight gigabyte model, [127.74]
49
+ [127.74] exporting photos and videos as much as three times faster, [131.32]
50
+ [131.32] despite only having two times the remembering power. [134.16]
51
+ [134.92] Now, [135.12]
52
+
53
+ [135.12] enthusiasts only got more upset about Apple's decision to under-equip the base model MacBook Pro [140.52]
54
+ [140.52] after the company's VP [141.96]
55
+ [141.96] of worldwide marketing, Bob Borchers, [144.66]
56
+ [145.0] totally borked himself by telling bilibili creator, Yee Lee [150.52]
57
+ [151.2] that eight gigabytes of RAM on the M3 MacBook [153.96]
58
+ [153.96] Pro is analogous to 16 gigabytes on other systems. [158.32]
59
+ [158.6] Now, [159.0]
60
+ [159.0] you can acknowledge that Apple's software and hardware optimization is high art, [163.82]
61
+ [163.82] while also being glad you weren't drinking some delicious 2% milk when you heard Borchers claim. [168.96]
62
+ [169.18] Because I changed my pants enough times in one day, okay? [172.58]
63
+
64
+ [172.92] But hey, at least Apple used two separate NAND modules for the storage this time. [177.62]
65
+ [178.14] Not because people asked for that. [179.86]
66
+ [179.86] They don't care. [182.18]
67
+ [182.7] Intel has been waiting its turn to be called out for some nonsense, [185.72]
68
+ [185.72] so thank goodness that MSI released a BIOS update [188.84]
69
+ [188.84] for its Z790 motherboards that enables support [191.78]
70
+ [191.78] for the incredibly generic sounding Intel Application Optimization feature, or APO. [197.66]
71
+ [197.66] The feature is actually pretty cool. [200.14]
72
+ [200.14] Hardware Unboxed did some testing with their now updated MSI boards, [203.44]
73
+
74
+ [203.44] and credited APO as a fix for the way Intel's efficiency cores, or E-cores, [208.84]
75
+ [209.16] handle gaming. [209.64]
76
+ [209.9] But despite sounding like something that should work on pretty much any Intel chip with efficiency cores, [215.06]
77
+ [215.06] like the 12th and 13th gen lineups, [217.4]
78
+ [217.72] APO only works on select 14th gen core processors. [221.64]
79
+ [221.92] And when Hub asked Intel, [223.98]
80
+ [224.18] what's the deal with that? [225.5]
81
+ [225.92] Intel gave a bone chillingly corporate response. [228.7]
82
+ [229.42] Intel has no plans to support prior generation products with application optimization. [233.88]
83
+ [234.38] Hello? [234.64]
84
+
85
+ [234.98] I'm a human being. [236.28]
86
+ [236.44] I have feelings. [237.44]
87
+ [237.7] Beep boop. [238.48]
88
+ [239.0] Hardware Unboxed also asked Intel [240.22]
89
+ [240.22] if they plan to support more than the only two games that work with APO right now, [244.82]
90
+ [245.14] Metro Exodus and Rainbow Six Siege, [247.08]
91
+ [247.08] to which Intel replied, yeah, probably. [250.26]
92
+
93
+ [289.02] Quick Bits, man, they are, they're so cool. [292.54]
94
+ [292.54] I'm in a rush today. [293.34]
95
+ [293.34] I didn't have time to think of something amazing. [294.86]
96
+ [294.86] Okay, well, [295.2]
97
+ [295.2] NVIDIA has announced the H200, [297.02]
98
+ [297.02] an upgraded version of the H100 GPU. [299.0]
99
+ [299.92] which is so in demand for running AI right now that the US's dollar value [304.02]
100
+ [304.02] might get tethered to it soon. [305.4]
101
+ [305.4] The H200's specs appear to be largely similar to the H100's, [309.46]
102
+ [309.66] except for the memory, [311.08]
103
+
104
+ [311.08] which is upgraded from HBM3 to HBM3e, [314.78]
105
+ [314.78] boosting memory bandwidth, clocks, and capacity. [317.56]
106
+ [317.82] The H100 had 80 gigabytes of VRAM, [320.26]
107
+ [320.26] while the H200 has 141. [322.98]
108
+ [323.26] Think about all the things you could do with that. [325.44]
109
+ [325.44] Like emulate 8.88 gigabyte M3 Macbook Pros [329.6]
110
+ [329.84] Yeah, [330.72]
111
+ [330.72] you're gonna do the math. [331.66]
112
+ [331.66] RTX 4090s are still pouring into repair shops with melted power plugs [335.96]
113
+
114
+ [335.96] more than a year after problems with the card's 12 volt high power connector were first reported, [341.1]
115
+ [341.44] according to Alex from Northridge Fix on YouTube. [344.36]
116
+ [344.36] He says his repair shop still gets [346.06]
117
+ [346.06] about 20 to 25 4090s in per week, [349.48]
118
+ [349.88] proving once and for all that the 4090 owners [352.36]
119
+ [352.36] just didn't plug them in right, guys. [354.32]
120
+ [354.32] You gotta push it all the way in. [356.08]
121
+ [356.08] It's your fault. [356.78]
122
+ [357.0] Thankfully, [357.42]
123
+
124
+ [357.42] PCI SIG has now redesigned the connector, [360.14]
125
+ [360.14] so hopefully future generations of financially questionable decision makers [364.18]
126
+ [364.18] won't endure the suffering you have. [366.18]
127
+ [366.4] It's not actually your fault. [367.94]
128
+ [367.94] I was joking. [368.56]
129
+ [368.56] Stop writing that comment. [369.78]
130
+ [370.14] Australia's ports are reopening after being shut down by a massive cyber attack three days ago, [375.68]
131
+ [375.86] according to DP World Australia, [377.78]
132
+ [377.98] which is not related to what you're thinking of. [380.62]
133
+ [380.62] It's actually the country's biggest ports operator, [383.34]
134
+
135
+ [383.66] which still sounds... [386.04]
136
+ [386.04] Damn it. [386.5]
137
+ [387.0] The cyber attack caused huge delays and congestion, [389.2]
138
+ [389.36] and some data was apparently stolen by the perpetrators, [391.86]
139
+ [391.86] who are believed to be foreign state actors. [394.36]
140
+ [394.68] But I reckon they should see whether the front fell off. [397.58]
141
+ [397.58] Widely reported issues with SanDisk Extreme Pro SSDs [400.99]
142
+ [400.99] are the result of hardware issues unfixable by any firmware update, [405.32]
143
+ [405.52] according to data recovery company Atingo. [408.36]
144
+ [408.36] Their managing director told Futurezone that some of the components [411.9]
145
+ [411.9] SanDisk used are too big for their circuit boards, [415.1]
146
+
147
+ [415.1] leading to unstable connections, [416.58]
148
+ [417.0] which caused some components to pop off the board entirely, [420.16]
149
+ [420.38] and not in a good way. [421.68]
150
+ [421.68] I would be shocked and appalled by this if I didn't remember that SanDisk is owned by Western Digital. [427.48]
151
+ [427.48] And Tesla's order agreement for the Cybertruck forbids owners [431.81]
152
+ [431.81] from selling the polygonal vehicle for one year after it's delivered, [436.64]
153
+ [437.04] unless you tell Tesla you want to sell it and give them a chance to buy it back from you. [441.58]
154
+ [441.58] If they don't want to buy it back, [443.56]
155
+ [443.56] they might give you written permission [445.52]
156
+ [445.52] to sell it to a third party, [446.86]
157
+
158
+ [447.12] like a hall pass, [447.86]
159
+ [448.02] but for basic economic rights. [449.72]
160
+ [449.72] If you violate this or any other provision in the agreement, [453.12]
161
+ [453.48] Tesla says they may locate and disable the vehicle electronically. [457.28]
162
+ [457.7] And really, I mean, [458.84]
163
+ [458.84] this should all make sense if you bought a Cybertruck. [461.16]
164
+ [461.52] It's not a normal truck. [462.62]
165
+ [463.14] It's... [464.02]
166
+
167
+ [464.02] It's ugly. [465.46]
168
+ [465.46] But you're beautiful inside and out, [467.48]
169
+ [467.48] and that's why I know you're gonna come back on Wednesday for more tech news. [470.26]
170
+ [470.26] It's just who you are, you know. [471.64]
171
+ [471.64] We love you for that. [473.24]
172
+ [473.24] Please. [473.7]
generate_chatgpt.py ADDED
@@ -0,0 +1,126 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+ from os import listdir
4
+ from os.path import isfile, join
5
+
6
+ INSTRUCT_CHUNKED_PROMPT = """你是一个擅长翻译科技新闻的翻译专家。请将以下内容翻译为中文,使用相同格式输出,并保留时间戳。不要漏掉任何信息。合并多行文本时,保留第一个和最后一个时间戳。
7
+ """
8
+
9
+ def new_message(eng_in, chs_out, prev_in = None, prev_out = None):
10
+ if(prev_in == None or prev_out == None):
11
+ return {"messages": [
12
+ {"role": "system", "content": INSTRUCT_CHUNKED_PROMPT},
13
+ {"role": "user", "content": eng_in},
14
+ {"role": "assistant", "content": chs_out}]
15
+ }
16
+ else:
17
+ return {"messages": [
18
+ {"role": "system", "content": INSTRUCT_CHUNKED_PROMPT},
19
+ {"role": "user", "content": prev_in},
20
+ {"role": "assistant", "content": prev_out},
21
+ {"role": "user", "content": eng_in},
22
+ {"role": "assistant", "content": chs_out}]
23
+ }
24
+
25
+ def write_jsonl(message_groups, filename):
26
+ with open(filename, "w", encoding='utf-8-sig') as fout:
27
+ for i in range(len(message_groups)):
28
+ if(i>0):
29
+ msg_obj = new_message(
30
+ message_groups[i][0].strip(),
31
+ message_groups[i][1].strip(),
32
+ message_groups[i-1][0].strip(),
33
+ message_groups[i-1][1].strip()
34
+ )
35
+ else:
36
+ msg_obj = new_message(
37
+ message_groups[i][0].strip(),
38
+ message_groups[i][1].strip()
39
+ )
40
+ json.dump(msg_obj, fout)
41
+ fout.write("\n")
42
+
43
+ message_groups = []
44
+
45
+ DOCUMENT_ROOT = "data"
46
+ files = listdir("data")
47
+ files = list(filter(lambda x: x.endswith(".en.txt"), files))
48
+ files.sort()
49
+
50
+ print(files)
51
+
52
+ for f in files:
53
+ en_fname = join(DOCUMENT_ROOT, f)
54
+ if en_fname.endswith(".en.txt") and isfile(en_fname):
55
+ cn_fname = join(DOCUMENT_ROOT, f.replace(".en.txt", ".cn.txt"))
56
+ if os.path.exists(cn_fname) and isfile(cn_fname):
57
+ print(f"Found data pair: {en_fname} and {cn_fname}")
58
+
59
+ with open(en_fname, "r", encoding='utf-8-sig') as enfin:
60
+ en_messages = enfin.read()
61
+
62
+ with open(cn_fname, "r", encoding='utf-8-sig') as cnfin:
63
+ cn_messages = cnfin.read()
64
+
65
+ en_messages = [part.strip() for part in en_messages.split("\n\n") if part.strip() != ""]
66
+ cn_messages = [part.strip() for part in cn_messages.split("\n\n") if part.strip() != ""]
67
+
68
+ if(len(en_messages) != len(cn_messages)):
69
+ print(f"English and Chinese version mismatch. Discarding {en_fname} pair.")
70
+
71
+ messages = zip(en_messages, cn_messages)
72
+
73
+ message_groups.extend(messages)
74
+
75
+ write_jsonl(message_groups, "combined.jsonl")
76
+
77
+ import random
78
+ random.shuffle(message_groups)
79
+
80
+ TEST_RATIO = 0.2
81
+
82
+ split_index = int(len(message_groups) * TEST_RATIO)
83
+
84
+ test = message_groups[:split_index]
85
+ train = message_groups[split_index:]
86
+
87
+ write_jsonl(train, "chatgpt-train.jsonl")
88
+ write_jsonl(test, "chatgpt-test.jsonl")
89
+
90
+ recent_files = files[-5:]
91
+ recent_messages = []
92
+
93
+ for f in recent_files:
94
+ en_fname = join(DOCUMENT_ROOT, f)
95
+ if en_fname.endswith(".en.txt") and isfile(en_fname):
96
+ cn_fname = join(DOCUMENT_ROOT, f.replace(".en.txt", ".cn.txt"))
97
+ if os.path.exists(cn_fname) and isfile(cn_fname):
98
+ print(f"Found data pair: {en_fname} and {cn_fname}")
99
+
100
+ with open(en_fname, "r", encoding='utf-8-sig') as enfin:
101
+ en_messages = enfin.read()
102
+
103
+ with open(cn_fname, "r", encoding='utf-8-sig') as cnfin:
104
+ cn_messages = cnfin.read()
105
+
106
+ en_messages = [part.strip() for part in en_messages.split("\n\n") if part.strip() != ""]
107
+ cn_messages = [part.strip() for part in cn_messages.split("\n\n") if part.strip() != ""]
108
+
109
+ if(len(en_messages) != len(cn_messages)):
110
+ print(f"English and Chinese version mismatch. Discarding {en_fname} pair.")
111
+
112
+ messages = zip(en_messages, cn_messages)
113
+
114
+ recent_messages.extend(messages)
115
+
116
+ write_jsonl(recent_messages, "recent-combined.jsonl")
117
+
118
+ TEST_RATIO = 0.2
119
+
120
+ split_index = int(len(recent_messages) * TEST_RATIO)
121
+
122
+ test = recent_messages[:split_index]
123
+ train = recent_messages[split_index:]
124
+
125
+ write_jsonl(train, "chatgpt-recent-train.jsonl")
126
+ write_jsonl(test, "chatgpt-recent-test.jsonl")
generate_llamafactory.py ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from os import listdir
3
+ from os.path import isfile, join
4
+ import json
5
+
6
+ INSTRUCT_CHUNKED_PROMPT = """你是一个擅长翻译科技新闻的翻译专家。请将以下内容翻译为中文,使用相同格式输出,并保留时间戳。不要漏掉任何信息。合并多行文本时,保留第一个和最后一个时间戳。"""
7
+
8
+ DOCUMENT_ROOT = "data"
9
+ files = listdir("data")
10
+
11
+ all_datapoints = []
12
+
13
+ for f in files:
14
+ en_fname = join(DOCUMENT_ROOT, f)
15
+ if en_fname.endswith(".en.txt") and isfile(en_fname):
16
+ cn_fname = join(DOCUMENT_ROOT, f.replace(".en.txt", ".cn.txt"))
17
+ if os.path.exists(cn_fname) and isfile(cn_fname):
18
+ print(f"Found data pair: {en_fname} and {cn_fname}")
19
+
20
+ with open(en_fname, "r", encoding='utf-8-sig') as enfin:
21
+ en_messages = enfin.read()
22
+
23
+ with open(cn_fname, "r", encoding='utf-8-sig') as cnfin:
24
+ cn_messages = cnfin.read()
25
+
26
+ en_messages = [part.strip() for part in en_messages.split("\n\n") if part.strip() != ""]
27
+ cn_messages = [part.strip() for part in cn_messages.split("\n\n") if part.strip() != ""]
28
+
29
+ if(len(en_messages) != len(cn_messages)):
30
+ print(f"English and Chinese version mismatch. Discarding {en_fname} pair.")
31
+
32
+ # Write document
33
+ history = []
34
+ for en, cn in zip(en_messages, cn_messages):
35
+ all_datapoints.append({
36
+ 'system': INSTRUCT_CHUNKED_PROMPT,
37
+ 'input': en,
38
+ 'output': cn,
39
+ 'history': history
40
+ })
41
+ history.append([en, cn])
42
+
43
+ import random
44
+ shuffled = random.shuffle(all_datapoints)
45
+
46
+ COUNT = len(all_datapoints)
47
+ TRAIN = int(0.8 * COUNT)
48
+
49
+ train_dataset = all_datapoints[:TRAIN]
50
+ evaluation_dataset = all_datapoints[TRAIN:]
51
+
52
+ with open("train.json", "w", encoding='utf-8-sig') as train_f:
53
+ for d in train_dataset:
54
+ json.dump(d, train_f)
55
+ train_f.write('\n')
56
+
57
+ with open("test.json", "w", encoding='utf-8-sig') as ev_f:
58
+ for d in evaluation_dataset:
59
+ json.dump(d, ev_f)
60
+ ev_f.write('\n')
jsonl_gen.ipynb DELETED
@@ -1,229 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": 9,
6
- "metadata": {},
7
- "outputs": [],
8
- "source": [
9
- "import json"
10
- ]
11
- },
12
- {
13
- "cell_type": "code",
14
- "execution_count": 10,
15
- "metadata": {},
16
- "outputs": [],
17
- "source": [
18
- "INSTRUCT_CHUNKED_PROMPT = \"\"\"你是一个擅长翻译科技新闻的翻译专家。请将以下内容翻译为中文,使用相同格式输出,并保留时间戳。不要漏掉任何信息。合并多行文本时,保留第一个和最后一个时间戳。\n",
19
- "\"\"\""
20
- ]
21
- },
22
- {
23
- "cell_type": "code",
24
- "execution_count": 11,
25
- "metadata": {},
26
- "outputs": [],
27
- "source": [
28
- "def new_message(eng_in, chs_out, prev_in = None, prev_out = None):\n",
29
- " if(prev_in == None or prev_out == None):\n",
30
- " return {\"messages\": [\n",
31
- " {\"role\": \"system\", \"content\": INSTRUCT_CHUNKED_PROMPT}, \n",
32
- " {\"role\": \"user\", \"content\": eng_in}, \n",
33
- " {\"role\": \"assistant\", \"content\": chs_out}]\n",
34
- " }\n",
35
- " else:\n",
36
- " return {\"messages\": [\n",
37
- " {\"role\": \"system\", \"content\": INSTRUCT_CHUNKED_PROMPT}, \n",
38
- " {\"role\": \"user\", \"content\": prev_in}, \n",
39
- " {\"role\": \"assistant\", \"content\": prev_out},\n",
40
- " {\"role\": \"user\", \"content\": eng_in}, \n",
41
- " {\"role\": \"assistant\", \"content\": chs_out}]\n",
42
- " }"
43
- ]
44
- },
45
- {
46
- "cell_type": "code",
47
- "execution_count": 12,
48
- "metadata": {},
49
- "outputs": [],
50
- "source": [
51
- "def write_jsonl(message_groups, filename):\n",
52
- " with open(filename, \"w\") as fout:\n",
53
- " for i in range(len(message_groups)):\n",
54
- " if(i>0):\n",
55
- " msg_obj = new_message(\n",
56
- " message_groups[i][0].strip(),\n",
57
- " message_groups[i][1].strip(),\n",
58
- " message_groups[i-1][0].strip(),\n",
59
- " message_groups[i-1][1].strip()\n",
60
- " )\n",
61
- " else:\n",
62
- " msg_obj = new_message(\n",
63
- " message_groups[i][0].strip(),\n",
64
- " message_groups[i][1].strip()\n",
65
- " )\n",
66
- " json.dump(msg_obj, fout)\n",
67
- " fout.write(\"\\n\")"
68
- ]
69
- },
70
- {
71
- "cell_type": "code",
72
- "execution_count": 13,
73
- "metadata": {},
74
- "outputs": [],
75
- "source": [
76
- "message_groups = []"
77
- ]
78
- },
79
- {
80
- "cell_type": "code",
81
- "execution_count": 14,
82
- "metadata": {},
83
- "outputs": [
84
- {
85
- "name": "stdout",
86
- "output_type": "stream",
87
- "text": [
88
- "['2023-10-11 Watch Out, Apple... [5v72vj2nFN0].en.txt', \"2023-10-14 It's Finally Over. [KJF5Nn23CwM]-4k.en.txt\", '2023-10-16 Apple, Are U Ok? [34R2xVzBmfA].en.txt', '2023-10-18 China lost its GPU privileges [Wz9JoTTRa4k].en.txt', \"2023-10-25 Windows' Apple Silicon Moment is Coming [xFvGERpRUpM].en.txt\", '2023-10-28 Google Pays Apple EVERY YEAR [qvZAYJLmzuk].en.txt', '2023-10-30 Nvidia Please No [AQ8kEsu41uE].en.txt', '2023-11-01 Gamers: Apple Wants YOU! [BIQ3JcWJzT0].en.txt', '2023-11-04 Actually, Google LIKES Adblock [Z6zZFj9eE60].en.txt', '2023-11-06 Grok [rCmsoa2Zlhg].en.txt']\n",
89
- "Found data pair: data\\2023-10-11 Watch Out, Apple... [5v72vj2nFN0].en.txt and data\\2023-10-11 Watch Out, Apple... [5v72vj2nFN0].cn.txt\n",
90
- "Found data pair: data\\2023-10-14 It's Finally Over. [KJF5Nn23CwM]-4k.en.txt and data\\2023-10-14 It's Finally Over. [KJF5Nn23CwM]-4k.cn.txt\n",
91
- "Found data pair: data\\2023-10-16 Apple, Are U Ok? [34R2xVzBmfA].en.txt and data\\2023-10-16 Apple, Are U Ok? [34R2xVzBmfA].cn.txt\n",
92
- "Found data pair: data\\2023-10-18 China lost its GPU privileges [Wz9JoTTRa4k].en.txt and data\\2023-10-18 China lost its GPU privileges [Wz9JoTTRa4k].cn.txt\n",
93
- "Found data pair: data\\2023-10-25 Windows' Apple Silicon Moment is Coming [xFvGERpRUpM].en.txt and data\\2023-10-25 Windows' Apple Silicon Moment is Coming [xFvGERpRUpM].cn.txt\n",
94
- "Found data pair: data\\2023-10-28 Google Pays Apple EVERY YEAR [qvZAYJLmzuk].en.txt and data\\2023-10-28 Google Pays Apple EVERY YEAR [qvZAYJLmzuk].cn.txt\n",
95
- "Found data pair: data\\2023-10-30 Nvidia Please No [AQ8kEsu41uE].en.txt and data\\2023-10-30 Nvidia Please No [AQ8kEsu41uE].cn.txt\n",
96
- "Found data pair: data\\2023-11-01 Gamers: Apple Wants YOU! [BIQ3JcWJzT0].en.txt and data\\2023-11-01 Gamers: Apple Wants YOU! [BIQ3JcWJzT0].cn.txt\n",
97
- "Found data pair: data\\2023-11-04 Actually, Google LIKES Adblock [Z6zZFj9eE60].en.txt and data\\2023-11-04 Actually, Google LIKES Adblock [Z6zZFj9eE60].cn.txt\n",
98
- "Found data pair: data\\2023-11-06 Grok [rCmsoa2Zlhg].en.txt and data\\2023-11-06 Grok [rCmsoa2Zlhg].cn.txt\n"
99
- ]
100
- }
101
- ],
102
- "source": [
103
- "import os\n",
104
- "from os import listdir\n",
105
- "from os.path import isfile, join\n",
106
- "\n",
107
- "DOCUMENT_ROOT = \"data\"\n",
108
- "files = listdir(\"data\")\n",
109
- "files = list(filter(lambda x: x.endswith(\".en.txt\"), files))\n",
110
- "files.sort()\n",
111
- "\n",
112
- "print(files)\n",
113
- "\n",
114
- "for f in files:\n",
115
- " en_fname = join(DOCUMENT_ROOT, f)\n",
116
- " if en_fname.endswith(\".en.txt\") and isfile(en_fname):\n",
117
- " cn_fname = join(DOCUMENT_ROOT, f.replace(\".en.txt\", \".cn.txt\"))\n",
118
- " if os.path.exists(cn_fname) and isfile(cn_fname):\n",
119
- " print(f\"Found data pair: {en_fname} and {cn_fname}\")\n",
120
- "\n",
121
- " with open(en_fname, \"r\") as enfin:\n",
122
- " en_messages = enfin.read()\n",
123
- "\n",
124
- " with open(cn_fname, \"r\") as cnfin:\n",
125
- " cn_messages = cnfin.read()\n",
126
- " \n",
127
- " en_messages = [part.strip() for part in en_messages.split(\"\\n\\n\") if part.strip() != \"\"]\n",
128
- " cn_messages = [part.strip() for part in cn_messages.split(\"\\n\\n\") if part.strip() != \"\"]\n",
129
- "\n",
130
- " if(len(en_messages) != len(cn_messages)):\n",
131
- " print(f\"English and Chinese version mismatch. Discarding {en_fname} pair.\")\n",
132
- " \n",
133
- " messages = zip(en_messages, cn_messages)\n",
134
- "\n",
135
- " message_groups.extend(messages)"
136
- ]
137
- },
138
- {
139
- "cell_type": "code",
140
- "execution_count": 15,
141
- "metadata": {},
142
- "outputs": [],
143
- "source": [
144
- "write_jsonl(message_groups, \"combined.jsonl\")"
145
- ]
146
- },
147
- {
148
- "cell_type": "code",
149
- "execution_count": 16,
150
- "metadata": {},
151
- "outputs": [],
152
- "source": [
153
- "import random\n",
154
- "random.shuffle(message_groups)\n",
155
- "\n",
156
- "TEST_RATIO = 0.2\n",
157
- "\n",
158
- "split_index = int(len(message_groups) * TEST_RATIO)\n",
159
- "\n",
160
- "test = message_groups[:split_index]\n",
161
- "train = message_groups[split_index:]\n",
162
- "\n",
163
- "write_jsonl(train, \"chatgpt-train.jsonl\")\n",
164
- "write_jsonl(test, \"chatgpt-test.jsonl\")"
165
- ]
166
- },
167
- {
168
- "cell_type": "code",
169
- "execution_count": 20,
170
- "metadata": {},
171
- "outputs": [],
172
- "source": [
173
- "recent_files = files[-5:]\n",
174
- "recent_messages = []"
175
- ]
176
- },
177
- {
178
- "cell_type": "code",
179
- "execution_count": null,
180
- "metadata": {},
181
- "outputs": [],
182
- "source": [
183
- "for f in recent_files:\n",
184
- " en_fname = join(DOCUMENT_ROOT, f)\n",
185
- " if en_fname.endswith(\".en.txt\") and isfile(en_fname):\n",
186
- " cn_fname = join(DOCUMENT_ROOT, f.replace(\".en.txt\", \".cn.txt\"))\n",
187
- " if os.path.exists(cn_fname) and isfile(cn_fname):\n",
188
- " print(f\"Found data pair: {en_fname} and {cn_fname}\")\n",
189
- "\n",
190
- " with open(en_fname, \"r\") as enfin:\n",
191
- " en_messages = enfin.read()\n",
192
- "\n",
193
- " with open(cn_fname, \"r\") as cnfin:\n",
194
- " cn_messages = cnfin.read()\n",
195
- " \n",
196
- " en_messages = [part.strip() for part in en_messages.split(\"\\n\\n\") if part.strip() != \"\"]\n",
197
- " cn_messages = [part.strip() for part in cn_messages.split(\"\\n\\n\") if part.strip() != \"\"]\n",
198
- "\n",
199
- " if(len(en_messages) != len(cn_messages)):\n",
200
- " print(f\"English and Chinese version mismatch. Discarding {en_fname} pair.\")\n",
201
- " \n",
202
- " messages = zip(en_messages, cn_messages)\n",
203
- "\n",
204
- " recent_messages.extend(messages)"
205
- ]
206
- }
207
- ],
208
- "metadata": {
209
- "kernelspec": {
210
- "display_name": "whisper",
211
- "language": "python",
212
- "name": "python3"
213
- },
214
- "language_info": {
215
- "codemirror_mode": {
216
- "name": "ipython",
217
- "version": 3
218
- },
219
- "file_extension": ".py",
220
- "mimetype": "text/x-python",
221
- "name": "python",
222
- "nbconvert_exporter": "python",
223
- "pygments_lexer": "ipython3",
224
- "version": "3.10.13"
225
- }
226
- },
227
- "nbformat": 4,
228
- "nbformat_minor": 2
229
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
jsonl_gen_for_chatglm.ipynb DELETED
@@ -1,120 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": 1,
6
- "metadata": {},
7
- "outputs": [
8
- {
9
- "name": "stdout",
10
- "output_type": "stream",
11
- "text": [
12
- "Found data pair: data\\2023-10-11 Watch Out, Apple... [5v72vj2nFN0].en.txt and data\\2023-10-11 Watch Out, Apple... [5v72vj2nFN0].cn.txt\n",
13
- "Found data pair: data\\2023-10-14 It's Finally Over. [KJF5Nn23CwM]-4k.en.txt and data\\2023-10-14 It's Finally Over. [KJF5Nn23CwM]-4k.cn.txt\n",
14
- "Found data pair: data\\2023-10-16 Apple, Are U Ok? [34R2xVzBmfA].en.txt and data\\2023-10-16 Apple, Are U Ok? [34R2xVzBmfA].cn.txt\n",
15
- "Found data pair: data\\2023-10-18 China lost its GPU privileges [Wz9JoTTRa4k].en.txt and data\\2023-10-18 China lost its GPU privileges [Wz9JoTTRa4k].cn.txt\n",
16
- "Found data pair: data\\2023-10-25 Windows' Apple Silicon Moment is Coming [xFvGERpRUpM].en.txt and data\\2023-10-25 Windows' Apple Silicon Moment is Coming [xFvGERpRUpM].cn.txt\n",
17
- "Found data pair: data\\2023-10-28 Google Pays Apple EVERY YEAR [qvZAYJLmzuk].en.txt and data\\2023-10-28 Google Pays Apple EVERY YEAR [qvZAYJLmzuk].cn.txt\n"
18
- ]
19
- }
20
- ],
21
- "source": [
22
- "import os\n",
23
- "from os import listdir\n",
24
- "from os.path import isfile, join\n",
25
- "import json\n",
26
- "\n",
27
- "INSTRUCT_CHUNKED_PROMPT = \"\"\"你是一个擅长翻译科技新闻的翻译专家。请将以下内容翻译为中文,使用相同格式输出,并保留时间戳。不要漏掉任何信息。合并多行文本时,保留第一个和最后一个时间戳。\"\"\"\n",
28
- "\n",
29
- "DOCUMENT_ROOT = \"data\"\n",
30
- "files = listdir(\"data\")\n",
31
- "\n",
32
- "all_datapoints = []\n",
33
- "\n",
34
- "for f in files:\n",
35
- " en_fname = join(DOCUMENT_ROOT, f)\n",
36
- " if en_fname.endswith(\".en.txt\") and isfile(en_fname):\n",
37
- " cn_fname = join(DOCUMENT_ROOT, f.replace(\".en.txt\", \".cn.txt\"))\n",
38
- " if os.path.exists(cn_fname) and isfile(cn_fname):\n",
39
- " print(f\"Found data pair: {en_fname} and {cn_fname}\")\n",
40
- "\n",
41
- " with open(en_fname, \"r\") as enfin:\n",
42
- " en_messages = enfin.read()\n",
43
- "\n",
44
- " with open(cn_fname, \"r\") as cnfin:\n",
45
- " cn_messages = cnfin.read()\n",
46
- " \n",
47
- " en_messages = [part.strip() for part in en_messages.split(\"\\n\\n\") if part.strip() != \"\"]\n",
48
- " cn_messages = [part.strip() for part in cn_messages.split(\"\\n\\n\") if part.strip() != \"\"]\n",
49
- "\n",
50
- " if(len(en_messages) != len(cn_messages)):\n",
51
- " print(f\"English and Chinese version mismatch. Discarding {en_fname} pair.\")\n",
52
- " \n",
53
- " # Write document\n",
54
- " history = []\n",
55
- " for en, cn in zip(en_messages, cn_messages):\n",
56
- " all_datapoints.append({\n",
57
- " 'system': INSTRUCT_CHUNKED_PROMPT, \n",
58
- " 'input': en,\n",
59
- " 'output': cn,\n",
60
- " 'history': history\n",
61
- " })\n",
62
- " history.append([en, cn])"
63
- ]
64
- },
65
- {
66
- "cell_type": "code",
67
- "execution_count": 2,
68
- "metadata": {},
69
- "outputs": [],
70
- "source": [
71
- "import random\n",
72
- "shuffled = random.shuffle(all_datapoints)\n",
73
- "\n",
74
- "COUNT = len(all_datapoints)\n",
75
- "TRAIN = int(0.8 * COUNT)\n",
76
- "\n",
77
- "train_dataset = all_datapoints[:TRAIN]\n",
78
- "evaluation_dataset = all_datapoints[TRAIN:]\n",
79
- "\n",
80
- "with open(\"train.json\", \"w\") as train_f:\n",
81
- " for d in train_dataset:\n",
82
- " json.dump(d, train_f)\n",
83
- " train_f.write('\\n')\n",
84
- "\n",
85
- "with open(\"test.json\", \"w\") as ev_f:\n",
86
- " for d in evaluation_dataset:\n",
87
- " json.dump(d, ev_f)\n",
88
- " ev_f.write('\\n')\n"
89
- ]
90
- },
91
- {
92
- "cell_type": "code",
93
- "execution_count": null,
94
- "metadata": {},
95
- "outputs": [],
96
- "source": []
97
- }
98
- ],
99
- "metadata": {
100
- "kernelspec": {
101
- "display_name": "Python 3",
102
- "language": "python",
103
- "name": "python3"
104
- },
105
- "language_info": {
106
- "codemirror_mode": {
107
- "name": "ipython",
108
- "version": 3
109
- },
110
- "file_extension": ".py",
111
- "mimetype": "text/x-python",
112
- "name": "python",
113
- "nbconvert_exporter": "python",
114
- "pygments_lexer": "ipython3",
115
- "version": "3.9.18"
116
- }
117
- },
118
- "nbformat": 4,
119
- "nbformat_minor": 2
120
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
test.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f85f753eeb7220638ac9a806f5b81bb422f2f505ff6f1acac2385c2fc32de060
3
- size 1341274
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8d5209c74ca98036583b7a7e826e038acc78e32d46d1db526fb71b100b32a2bc
3
+ size 1426136
train.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:57be287bae0ca27540a71b5b1ed1d8b35ac416c72d92a6a75c134cbc4a870eba
3
- size 5322699
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3b11a55096b154473c92e453a167e015c2af7624845b0b781d4b5c9877c36eb0
3
+ size 5662033