kechengcode commited on
Commit
543dfcd
·
verified ·
1 Parent(s): b82af3a

Upload folder using huggingface_hub

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
README.md ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: mlc-llm
3
+ base_model: microsoft/phi-2
4
+ tags:
5
+ - mlc-llm
6
+ - web-llm
7
+ ---
8
+
9
+ # phi-2-q0f16-MLC
10
+
11
+ This is the [phi-2](https://huggingface.co/microsoft/phi-2) model in MLC format `q0f16`.
12
+ The model can be used for projects [MLC-LLM](https://github.com/mlc-ai/mlc-llm) and [WebLLM](https://github.com/mlc-ai/web-llm).
13
+
14
+ ## Example Usage
15
+
16
+ Here are some examples of using this model in MLC LLM.
17
+ Before running the examples, please install MLC LLM by following the [installation documentation](https://llm.mlc.ai/docs/install/mlc_llm.html#install-mlc-packages).
18
+
19
+ ### Chat
20
+
21
+ In command line, run
22
+ ```bash
23
+ mlc_llm chat HF://mlc-ai/phi-2-q0f16-MLC
24
+ ```
25
+
26
+ ### REST Server
27
+
28
+ In command line, run
29
+ ```bash
30
+ mlc_llm serve HF://mlc-ai/phi-2-q0f16-MLC
31
+ ```
32
+
33
+ ### Python API
34
+
35
+ ```python
36
+ from mlc_llm import MLCEngine
37
+
38
+ # Create engine
39
+ model = "HF://mlc-ai/phi-2-q0f16-MLC"
40
+ engine = MLCEngine(model)
41
+
42
+ # Run chat completion in OpenAI API.
43
+ for response in engine.chat.completions.create(
44
+ messages=[{"role": "user", "content": "What is the meaning of life?"}],
45
+ model=model,
46
+ stream=True,
47
+ ):
48
+ for choice in response.choices:
49
+ print(choice.delta.content, end="", flush=True)
50
+ print("\n")
51
+
52
+ engine.terminate()
53
+ ```
54
+
55
+ ## Documentation
56
+
57
+ For more information on MLC LLM project, please visit our [documentation](https://llm.mlc.ai/docs/) and [GitHub repo](http://github.com/mlc-ai/mlc-llm).
added_tokens.json ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "\t\t": 50294,
3
+ "\t\t\t": 50293,
4
+ "\t\t\t\t": 50292,
5
+ "\t\t\t\t\t": 50291,
6
+ "\t\t\t\t\t\t": 50290,
7
+ "\t\t\t\t\t\t\t": 50289,
8
+ "\t\t\t\t\t\t\t\t": 50288,
9
+ "\t\t\t\t\t\t\t\t\t": 50287,
10
+ " ": 50286,
11
+ " ": 50285,
12
+ " ": 50284,
13
+ " ": 50283,
14
+ " ": 50282,
15
+ " ": 50281,
16
+ " ": 50280,
17
+ " ": 50279,
18
+ " ": 50278,
19
+ " ": 50277,
20
+ " ": 50276,
21
+ " ": 50275,
22
+ " ": 50274,
23
+ " ": 50273,
24
+ " ": 50272,
25
+ " ": 50271,
26
+ " ": 50270,
27
+ " ": 50269,
28
+ " ": 50268,
29
+ " ": 50267,
30
+ " ": 50266,
31
+ " ": 50265,
32
+ " ": 50264,
33
+ " ": 50263,
34
+ " ": 50262,
35
+ " ": 50261,
36
+ " ": 50260,
37
+ " ": 50259,
38
+ " ": 50258,
39
+ " ": 50257
40
+ }
logs.txt ADDED
The diff for this file is too large to render. See raw diff
 
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
mlc-chat-config.json ADDED
@@ -0,0 +1,74 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "phi-msft",
3
+ "quantization": "q0f16",
4
+ "model_config": {
5
+ "model_type": "phi-msft",
6
+ "vocab_size": 51200,
7
+ "n_positions": 2048,
8
+ "n_embd": 2560,
9
+ "n_layer": 32,
10
+ "n_inner": 10240,
11
+ "n_head": 32,
12
+ "rotary_dim": 32,
13
+ "position_embedding_base": 10000,
14
+ "layer_norm_epsilon": 1e-05,
15
+ "context_window_size": 768,
16
+ "prefill_chunk_size": 768,
17
+ "n_head_kv": 32,
18
+ "head_dim": 80,
19
+ "tensor_parallel_shards": 1,
20
+ "max_batch_size": 80
21
+ },
22
+ "vocab_size": 51200,
23
+ "context_window_size": 768,
24
+ "sliding_window_size": -1,
25
+ "prefill_chunk_size": 768,
26
+ "attention_sink_size": -1,
27
+ "tensor_parallel_shards": 1,
28
+ "mean_gen_len": 128,
29
+ "max_gen_len": 512,
30
+ "shift_fill_factor": 0.3,
31
+ "temperature": 0.7,
32
+ "repetition_penalty": 1.0,
33
+ "top_p": 0.95,
34
+ "conv_template": {
35
+ "name": "phi-2",
36
+ "system_template": "{system_message}",
37
+ "system_message": "",
38
+ "add_role_after_system_message": true,
39
+ "roles": {
40
+ "user": "Instruct",
41
+ "assistant": "Output"
42
+ },
43
+ "role_templates": {
44
+ "user": "{user_message}",
45
+ "assistant": "{assistant_message}",
46
+ "tool": "{tool_message}"
47
+ },
48
+ "messages": [],
49
+ "seps": [
50
+ "\n"
51
+ ],
52
+ "role_content_sep": ": ",
53
+ "role_empty_sep": ":",
54
+ "stop_str": [
55
+ "<|endoftext|>"
56
+ ],
57
+ "stop_token_ids": [
58
+ 50256
59
+ ],
60
+ "function_string": "",
61
+ "use_function_calling": false
62
+ },
63
+ "pad_token_id": 0,
64
+ "bos_token_id": 1,
65
+ "eos_token_id": 2,
66
+ "tokenizer_files": [
67
+ "tokenizer.json",
68
+ "vocab.json",
69
+ "merges.txt",
70
+ "added_tokens.json",
71
+ "tokenizer_config.json"
72
+ ],
73
+ "version": "0.1.0"
74
+ }
ndarray-cache.json ADDED
The diff for this file is too large to render. See raw diff
 
params_shard_0.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:50bf76309c2ce1066f99b41aeb700e4e4d7613bf466c1aec5717c6a5ac793fe0
3
+ size 262144000
params_shard_1.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f57b4c71e556d6e7534741fd405ad4ff915e0928f9678e60187013cac521fe42
3
+ size 39321600
params_shard_10.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb43d5c3b2e2923f21eb7bedc0ba1ee9c90f87ec761ff6ba06e9aacf78363525
3
+ size 52428800
params_shard_100.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e29fb68a495b3b72f62d62cfa3a08b1aa7224631662aea1b12517529631d4c76
3
+ size 26327040
params_shard_101.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e97748b6fdf6db8d5c59a5213c971697c6b7cefd08ff72da7634ab842efae89e
3
+ size 52428800
params_shard_102.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7f2b79b51669ee563f4ff421d2422a099936fbb842155ed5b27bc31c5a6826a1
3
+ size 52428800
params_shard_103.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d43caa6dc96fcb6f1b578546329ae0597c52740fb9d4c8d9d18997d4c550c42
3
+ size 39321600
params_shard_104.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:746e66607cabdb499a91a0fd04a567b0c313da1abc796934e6a721b5668c93b2
3
+ size 52428800
params_shard_105.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:71f75b5a7db052320657b06c63e19b139e80303c1a573a8c27cbe25cc0d4b519
3
+ size 52428800
params_shard_106.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:922b34e14ce339ec73ca9813d23b4463d2af5053ac54e5a66d7e32fe0a11b65e
3
+ size 39321600
params_shard_107.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b76f35dbc315ccfda657f91f9f6055aaf1ba2923230480a0f1d910ff7b5dd6c5
3
+ size 26327040
params_shard_108.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a11964a3f210d342773bd00d2f0c98914d95f4b72fba9d3def41059d12b2b09e
3
+ size 52428800
params_shard_109.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2b7548383dbc6502dc9fc1d00389d67a493cf6ac8f1a2c0b2127be4072a282d8
3
+ size 52428800
params_shard_11.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef5107b169dbda18a0b6895eba266d39ba2e998326702e2095d7bf73f2175ed8
3
+ size 52428800
params_shard_110.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fe2242eb4324b51f3de37c0a91947e885bcf5cc9b3a6c8fab4113d059289aa70
3
+ size 39321600
params_shard_111.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3a38f5ea3bbda1eccab45a501dcdc6000074a20dfd70a4825e55bf2507f97f20
3
+ size 52428800
params_shard_112.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bd325725d5eeadd54cc6d290bcf8d96b7ce9e7f8c2739fd855be05bf4246b9fa
3
+ size 52428800
params_shard_113.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c50e725a1e5436a35a8599b9389ed8e30bab7f4bf42b9948c458afe70abba05a
3
+ size 26296320
params_shard_12.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:688c60d3f59407f2391129a3fbc6c6530d5fde1b74a7f6032cde1edc1223b338
3
+ size 39321600
params_shard_13.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7f0f33cb0fc4cc0804b9f01674daa345430998c9ab1d1ab9a2ac90e568b84d0c
3
+ size 52428800
params_shard_14.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e7597a053e48faf3aa7556c4c17da7b0418b6bfe7824c9ff43f01ba0e36ae86f
3
+ size 52428800
params_shard_15.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:377f4e38d720e9b4d32c4d4f4c29cfcf4c71ca88dbd820d397fd1a13e61a4e77
3
+ size 39321600
params_shard_16.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bfdb316626a06214146204afb654bdf86c1929060afc631904f571a8c77453cd
3
+ size 26327040
params_shard_17.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c41528b29669c590eaacadda0bdebf5e5853b0500ed9c54cd08986fac0b215fe
3
+ size 52428800
params_shard_18.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:29f8ff3ec88475f60165437d6ef239b8b64022b697b33bae221e53665b0b859c
3
+ size 52428800
params_shard_19.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ee90fff9c781b7b4e655c668445dc80886542e7adb532645fa2c1b3f53b89aa7
3
+ size 39321600
params_shard_2.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:454ef9cc4053b74379e8b421ec6280e25bc448aebf8805ad1090005f9d5165e6
3
+ size 52428800
params_shard_20.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9404233bd7cd057b9fd6db26796ac3310cf629c35239e21bb4f45a274a6ec118
3
+ size 52428800
params_shard_21.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:04c5f4ab68b5dffc5c0978669d5076c4db81b4b7da6d2789b8ea4d430de8be9a
3
+ size 52428800
params_shard_22.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:65c9c3969e15e141fc93bab6ac82b3c7dc6b8bb1b382c650bde99a29e603c8a7
3
+ size 39321600
params_shard_23.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ab489cb01f4f40b303875a69421b0a10d5dc6a929526831a7dd6ce0d7ef7fb26
3
+ size 26327040
params_shard_24.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:df514179c869457a0b51115ab38df5ec82ac5d5ed68c4e7db64d2e47deaa9367
3
+ size 52428800
params_shard_25.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9bd169371db2e71c59a5f7061ab3dcf66c4c2d49e2c0f0558f03b693cb12725a
3
+ size 52428800
params_shard_26.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:700b3f6b846016df241fe6548d7e53c8d4c75e0c7ef3073c1881303104b2c921
3
+ size 39321600
params_shard_27.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cca39daf8a368e703b0a88b7a0cbc99b042b0cd782705b27f6cb899526898eee
3
+ size 52428800
params_shard_28.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:368676a6799f94677f090e34ec78d672d8651542902fb534998628bcd7923825
3
+ size 52428800
params_shard_29.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dd86e8fb90e9e4a2b134172d287c8855cc204799859def3e964bee45c0c2b170
3
+ size 39321600
params_shard_3.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b492a4f3a67d39a8dc7c99f6b0416cf4e80f3183772fa9c09a83e43d00ed177f
3
+ size 52428800
params_shard_30.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2df73240a626e2915fd3f7d0573527b71fa2ec6d3e7b92992940d0fd3816e5a8
3
+ size 26327040
params_shard_31.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:039efc8f28c9958ec7b767c8cc87e9c660e51170f2bd0278d9ae21a3713af998
3
+ size 52428800
params_shard_32.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bf1f023d53b150d6bd0d2197e8be4e0deea1b4b9a21fdc90673e2ba64271ff7b
3
+ size 52428800
params_shard_33.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b26fdc9e18bb96a292e2694bb9b71a30b93dd5e4d2e8dbd2ebfd0bd9ba7e3edb
3
+ size 39321600
params_shard_34.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:706d6e8ac88ca8b4b3d97e5a3a5645267d88610f7c44db7d1749cbfdebba10cb
3
+ size 52428800
params_shard_35.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e6aa3e607f96ca521808822a60b557977764080646daf3d47175aa9ae01ab365
3
+ size 52428800