Views
No views yet
mlx-community/Meta-Llama-3-8B-Instruct-4bit using mlx-lm version 0.12.1.
Refer to the original model card for more details on the model.pip install mlx-lm1from mlx_lm import load, generate
2
3model, tokenizer = load("GusLovesMath/LlaMATH-3-8B-Instruct-4bit")
4response = generate(model, tokenizer, prompt="hello", verbose=True)1# Our Prompt
2prompt = """
3Q A new program had 60 downloads in the first month.
4The number of downloads in the second month was three
5times as many as the downloads in the first month,
6but then reduced by 30% in the third month. How many
7downloads did the program have total over the three months?
8"""
9print(f"Our Test Prompt")
10print(f"Q {prompt}")
11
12# Testing model with prompt
13response = generate(
14 model,
15 tokenizer,
16 prompt=prompt,
17 max_tokens=132,
18 temp=0.0,
19 verbose=False
20)
21
22# Printing models repsonse
23print(f'LlaMATH Response')
24print(response)1A: The number of downloads in the first month was 60.
2The number of downloads in the second month was three times as many as the downloads in the first month, so it was 60 * 3 = <<60*3=180>>180.
3The number of downloads in the third month was 30% less than the number of downloads in the second month, so it was 180 * 0.7 = <<180*0.7=126>>126.
4The total number of downloads over the three months was 60 + 180 + 126 = <<60+180+126=366>>366.
5#### 366