WilhelmT commited on
Commit
4ab8c36
·
verified ·
1 Parent(s): cc1a283

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -10
README.md CHANGED
@@ -90,12 +90,13 @@ from embedl.models.vllm import LLM
90
 
91
  model_id = "embedl/Llama-3.2-3B-Instruct-FlashHead-W4A16"
92
 
93
- sampling = SamplingParams(max_tokens=128, temperature=0.0)
94
- llm = LLM(model=model_id, trust_remote_code=True)
95
-
96
- prompt = "Write a haiku about coffee."
97
- output = llm.generate([prompt], sampling)
98
- print(output[0].outputs[0].text)
 
99
  ```
100
 
101
  ---
@@ -110,11 +111,13 @@ import asyncio
110
  from embedl.models.vllm.demo import run_repl
111
 
112
  model_id = "embedl/Llama-3.2-3B-Instruct-FlashHead-W4A16"
113
- asyncio.run(
114
- run_repl(
115
- model=model_id
 
 
 
116
  )
117
- )
118
  ```
119
  ---
120
 
 
90
 
91
  model_id = "embedl/Llama-3.2-3B-Instruct-FlashHead-W4A16"
92
 
93
+ if __name__ == "__main__":
94
+ sampling = SamplingParams(max_tokens=128, temperature=0.0)
95
+ llm = LLM(model=model_id, trust_remote_code=True)
96
+
97
+ prompt = "Write a haiku about coffee."
98
+ output = llm.generate([prompt], sampling)
99
+ print(output[0].outputs[0].text)
100
  ```
101
 
102
  ---
 
111
  from embedl.models.vllm.demo import run_repl
112
 
113
  model_id = "embedl/Llama-3.2-3B-Instruct-FlashHead-W4A16"
114
+
115
+ if __name__ == "__main__":
116
+ asyncio.run(
117
+ run_repl(
118
+ model=model_id
119
+ )
120
  )
 
121
  ```
122
  ---
123