ruihanglai commited on
Commit
5f43713
1 Parent(s): f3efba8

Add README

Browse files
Files changed (1) hide show
  1. README.md +56 -0
README.md ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: mlc-llm
3
+ base_model: meta-llama/Llama-3.1-70B-Instruct
4
+ tags:
5
+ - mlc-llm
6
+ ---
7
+
8
+ # Llama-3.1-70B-Instruct-fp8-MLC
9
+
10
+ This is the [Llama-3.1-70B-Instruct](https://huggingface.co/meta-llama/Llama-3.1-70B-Instruct) model in MLC format `e4m3_e4m3_f16` (FP8 quantization).
11
+ The model can be used for projects [MLC-LLM](https://github.com/mlc-ai/mlc-llm).
12
+
13
+ ## Example Usage
14
+
15
+ Here are some examples of using this model in MLC LLM.
16
+ 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).
17
+
18
+ ### Chat
19
+
20
+ In command line, run
21
+ ```bash
22
+ mlc_llm chat HF://mlc-ai/Llama-3.1-70B-Instruct-fp8-MLC
23
+ ```
24
+
25
+ ### REST Server
26
+
27
+ In command line, run
28
+ ```bash
29
+ mlc_llm serve HF://mlc-ai/Llama-3.1-70B-Instruct-fp8-MLC
30
+ ```
31
+
32
+ ### Python API
33
+
34
+ ```python
35
+ from mlc_llm import MLCEngine
36
+
37
+ # Create engine
38
+ model = "HF://mlc-ai/Llama-3.1-70B-Instruct-fp8-MLC"
39
+ engine = MLCEngine(model)
40
+
41
+ # Run chat completion in OpenAI API.
42
+ for response in engine.chat.completions.create(
43
+ messages=[{"role": "user", "content": "What is the meaning of life?"}],
44
+ model=model,
45
+ stream=True,
46
+ ):
47
+ for choice in response.choices:
48
+ print(choice.delta.content, end="", flush=True)
49
+ print("\n")
50
+
51
+ engine.terminate()
52
+ ```
53
+
54
+ ## Documentation
55
+
56
+ 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).