Uploaded new files
Browse files- sarvam.ipynb +97 -0
sarvam.ipynb
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cells": [
|
| 3 |
+
{
|
| 4 |
+
"cell_type": "code",
|
| 5 |
+
"execution_count": 6,
|
| 6 |
+
"metadata": {},
|
| 7 |
+
"outputs": [],
|
| 8 |
+
"source": [
|
| 9 |
+
"from rich import print as rprint"
|
| 10 |
+
]
|
| 11 |
+
},
|
| 12 |
+
{
|
| 13 |
+
"cell_type": "code",
|
| 14 |
+
"execution_count": 2,
|
| 15 |
+
"metadata": {},
|
| 16 |
+
"outputs": [],
|
| 17 |
+
"source": [
|
| 18 |
+
"import json\n",
|
| 19 |
+
"\n",
|
| 20 |
+
"content = json.load(open('/Users/dhruvanand/Downloads/tokenizer.json'))"
|
| 21 |
+
]
|
| 22 |
+
},
|
| 23 |
+
{
|
| 24 |
+
"cell_type": "code",
|
| 25 |
+
"execution_count": 3,
|
| 26 |
+
"metadata": {},
|
| 27 |
+
"outputs": [
|
| 28 |
+
{
|
| 29 |
+
"data": {
|
| 30 |
+
"text/plain": [
|
| 31 |
+
"131"
|
| 32 |
+
]
|
| 33 |
+
},
|
| 34 |
+
"execution_count": 3,
|
| 35 |
+
"metadata": {},
|
| 36 |
+
"output_type": "execute_result"
|
| 37 |
+
}
|
| 38 |
+
],
|
| 39 |
+
"source": [
|
| 40 |
+
"len(content[\"added_tokens\"])"
|
| 41 |
+
]
|
| 42 |
+
},
|
| 43 |
+
{
|
| 44 |
+
"cell_type": "code",
|
| 45 |
+
"execution_count": 7,
|
| 46 |
+
"metadata": {},
|
| 47 |
+
"outputs": [
|
| 48 |
+
{
|
| 49 |
+
"data": {
|
| 50 |
+
"text/html": [
|
| 51 |
+
"<pre style=\"white-space:pre;overflow-x:auto;line-height:normal;font-family:Menlo,'DejaVu Sans Mono',consolas,'Courier New',monospace\"><span style=\"color: #800080; text-decoration-color: #800080; font-weight: bold\">dict_keys</span><span style=\"font-weight: bold\">([</span><span style=\"color: #008000; text-decoration-color: #008000\">'type'</span>, <span style=\"color: #008000; text-decoration-color: #008000\">'dropout'</span>, <span style=\"color: #008000; text-decoration-color: #008000\">'unk_token'</span>, <span style=\"color: #008000; text-decoration-color: #008000\">'continuing_subword_prefix'</span>, <span style=\"color: #008000; text-decoration-color: #008000\">'end_of_word_suffix'</span>, <span style=\"color: #008000; text-decoration-color: #008000\">'fuse_unk'</span>, \n",
|
| 52 |
+
"<span style=\"color: #008000; text-decoration-color: #008000\">'byte_fallback'</span>, <span style=\"color: #008000; text-decoration-color: #008000\">'ignore_merges'</span>, <span style=\"color: #008000; text-decoration-color: #008000\">'vocab'</span>, <span style=\"color: #008000; text-decoration-color: #008000\">'merges'</span><span style=\"font-weight: bold\">])</span>\n",
|
| 53 |
+
"</pre>\n"
|
| 54 |
+
],
|
| 55 |
+
"text/plain": [
|
| 56 |
+
"\u001b[1;35mdict_keys\u001b[0m\u001b[1m(\u001b[0m\u001b[1m[\u001b[0m\u001b[32m'type'\u001b[0m, \u001b[32m'dropout'\u001b[0m, \u001b[32m'unk_token'\u001b[0m, \u001b[32m'continuing_subword_prefix'\u001b[0m, \u001b[32m'end_of_word_suffix'\u001b[0m, \u001b[32m'fuse_unk'\u001b[0m, \n",
|
| 57 |
+
"\u001b[32m'byte_fallback'\u001b[0m, \u001b[32m'ignore_merges'\u001b[0m, \u001b[32m'vocab'\u001b[0m, \u001b[32m'merges'\u001b[0m\u001b[1m]\u001b[0m\u001b[1m)\u001b[0m\n"
|
| 58 |
+
]
|
| 59 |
+
},
|
| 60 |
+
"metadata": {},
|
| 61 |
+
"output_type": "display_data"
|
| 62 |
+
}
|
| 63 |
+
],
|
| 64 |
+
"source": [
|
| 65 |
+
"rprint(content[\"model\"].keys())"
|
| 66 |
+
]
|
| 67 |
+
},
|
| 68 |
+
{
|
| 69 |
+
"cell_type": "code",
|
| 70 |
+
"execution_count": null,
|
| 71 |
+
"metadata": {},
|
| 72 |
+
"outputs": [],
|
| 73 |
+
"source": []
|
| 74 |
+
}
|
| 75 |
+
],
|
| 76 |
+
"metadata": {
|
| 77 |
+
"kernelspec": {
|
| 78 |
+
"display_name": "base",
|
| 79 |
+
"language": "python",
|
| 80 |
+
"name": "python3"
|
| 81 |
+
},
|
| 82 |
+
"language_info": {
|
| 83 |
+
"codemirror_mode": {
|
| 84 |
+
"name": "ipython",
|
| 85 |
+
"version": 3
|
| 86 |
+
},
|
| 87 |
+
"file_extension": ".py",
|
| 88 |
+
"mimetype": "text/x-python",
|
| 89 |
+
"name": "python",
|
| 90 |
+
"nbconvert_exporter": "python",
|
| 91 |
+
"pygments_lexer": "ipython3",
|
| 92 |
+
"version": "3.10.12"
|
| 93 |
+
}
|
| 94 |
+
},
|
| 95 |
+
"nbformat": 4,
|
| 96 |
+
"nbformat_minor": 2
|
| 97 |
+
}
|