File size: 2,042 Bytes
e1c9284 0f338e4 e1c9284 ff13b83 e1c9284 0f338e4 e1c9284 0f338e4 2b6bb51 e1c9284 2b6bb51 e1c9284 0f338e4 cd557c2 | 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 69 70 71 | ---
library_name: transformers
tags:
- OUAF
- Oracle
- 4GL
license: mit
language:
- en
base_model:
- meta-llama/Llama-3.2-1B-Instruct
---
### Model Description
Generate 4GL Scripts from english prompts
- **Developed by:** Amith Sourya Sadineni
- **Model type:** Text Generation
- **Language(s):** Python
- **License:** MIT
- **Finetuned from model:** meta-llama/Llama-3.2-1B-Instruct
### Model Sources [optional]
<!-- Provide the basic links for the model. -->
- **Repository:** https://huggingface.co/amithsourya/Script-Generate-4GL-V1.0/blob/main/adapter_model.safetensors
- **Demo:**
```python
from huggingface_hub import notebook_login
notebook_login()
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
from peft import PeftModel, PeftConfig
lora_path = "amithsourya/Script-Generate-4GL-V1.0"
peft_config = PeftConfig.from_pretrained(lora_path)
base_model = AutoModelForCausalLM.from_pretrained(
peft_config.base_model_name_or_path,
device_map="auto",
torch_dtype="auto"
)
model = PeftModel.from_pretrained(base_model, lora_path)
tokenizer = AutoTokenizer.from_pretrained(peft_config.base_model_name_or_path)
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer, device_map="auto")
prompt = "invoke a BO for read"
outputs = pipe(prompt, max_new_tokens=256)
print(outputs[0]["generated_text"])
```
## Environmental Impact
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
- **Hardware Type:** T4 GPU
- **Hours used:** 0H:23M
## Example


|