The Easiest and Cheapest Way to Deploy Finetuned Mistral 7B Instruct Model (or Any Model) | by Qendel AI - Freedium

PHOTO EMBED

Thu Nov 30 2023 00:41:37 GMT+0000 (Coordinated Universal Time)

Saved by @mikeee

Copy
import requests

API_URL = "https://XXXX"
headers = {
 "Authorization": "Bearer XXX",
 "Content-Type": "application/json"
}

def query(payload):
 response = requests.post(API_URL, headers=headers, json=payload)
 return response.json()

prompt = """### Instruction: 
         Use the input below to create an instruction, which could have been used to generate the input using an LLM. 

        ### Input 
          - Orange juice: liquid
          - Gatorade: liquid
          - Eye drops: liquid
          - Water: liquid
          - Peanut butter: solid
          - Iphone: solid
          - Beer: liquid
          - Guitar: solid
    
        ### Response:
    """
    
 
output = query({
 "inputs": prompt
})


print(output)

# output
"""
Tell me whether these are liquids or solids: 
orange juice, gatorade, eye drops, water, peanut butter, iphone, beer, guitar
"""
content_copyCOPY

https://freedium.cfd/https://medium.com/@qendelai/the-easiest-and-cheapest-way-to-deploy-finetuned-mistral-7b-instruct-model-or-any-model-3f236182e8b8