File size: 1,766 Bytes
a977b09
d37ecd5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8650572
d37ecd5
 
95ffc94
d37ecd5
 
afbe9c7
d37ecd5
afbe9c7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d37ecd5
a977b09
 
d37ecd5
a977b09
d37ecd5
b89689f
d37ecd5
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
from llama_cpp import Llama
def die(type):
    llm = Llama(model_path="./DeepSeek-Coder-V2-Lite-Instruct-Q5_K_S.gguf")
    responses = llm(
    f"""I am a {type} person 
   Create a diet plan to lose weight for a month i Want in the format :
    Week 1:\n
      - Breakfast:\n
      - Lunch:\n
      - Dinner:\n
    Week 2:\n
      - Breakfast:\n
      - Lunch:\n
      - Dinner:\n
    Week 3:\n
      - Breakfast:\n
      - Lunch:\n
      - Dinner:\n
    Week 4:
      - Breakfast:\n
      - Lunch:\n
      - Dinner:\n
    """,
        max_tokens=1000,
        temperature=0.7,
        top_p=0.95,
        top_k=40
    )
    return responses['choices'][0]['text']
def di(type):
    llm = Llama(model_path="./DeepSeek-Coder-V2-Lite-Instruct-Q5_K_S.gguf")
    responses = llm(
        f""" I am a person
        Create a diet plan to {di} for a month i Want in the format :
        Week 1:\n
          - Breakfast:\n
          - Lunch:\n
          - Dinner:\n
        Week 2:\n
          - Breakfast:\n
          - Lunch:\n
          - Dinner:\n
        Week 3:\n
          - Breakfast:\n
          - Lunch:\n
          - Dinner:\n
        Week 4:
          - Breakfast:\n
          - Lunch:\n
          - Dinner:\n
        """,
        max_tokens=600,
        temperature=0.7,
        top_p=0.95,
        top_k=40
    )
    return responses['choices'][0]['text']

def chats(type):
    llm = Llama(model_path="./metamath-13b-v10Q4_K_M.gguf")
    responses = llm(
        type,
        max_tokens=100,  # Increased token limit to ensure full plan generation
        temperature=0.6,  # Lower temperature for more deterministic output
        top_p=0.8,  # Adjusted for balance between speed and quality
        top_k=50
    )
    return responses['choices'][0]['text']