Views
No views yet
1from transformers import pipeline
2
3pipe = pipeline("text-generation", model="mvasiliniuc/iva-codeint-swift-small")
4outputs = pipe("func triggerNSNotification")
51API_URL = "https://api-inference.huggingface.co/models/mvasiliniuc/iva-codeint-swift-small"
2headers = {"Authorization": "Bearer <key>"}
3def query(payload):
4 response = requests.post(API_URL, headers=headers, json=payload)
5 return response.json()
6
7output = query({
8"inputs": """
9/*
10A function that gets the current device operating system.
11*/
12"""
13})
14pprint.pprint(output, compact=True)| Config | Value |
|---|---|
| seq length | 1024 |
| weight decay | 0.1 |
| learning rate | 0.0005 |
| max eval steps | -1 |
| shuffle buffer | 10000 |
| max train steps | 150000 |
| mixed precision | fp16 |
| num warmup steps | 2000 |
| train batch size | 5 |
| valid batch size | 5 |
| lr scheduler type | cosine |
| save checkpoint steps | 15000 |
| gradient checkpointing | false |
| gradient accumulation steps | 1 |