Text Generation
Transformers
Safetensors
Indonesian
llama
text-generation-inference

Run this model with HF Jobs

Run alxxtexxr/IndoWebGen-7B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/alxxtexxr/IndoWebGen-7B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/alxxtexxr/IndoWebGen-7B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/alxxtexxr/IndoWebGen-7B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/alxxtexxr/IndoWebGen-7B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

🇮🇩🌐🤖 IndoWebGen: LLM for Automated Website Generation Based on Indonesian Instructions

Hugely inspired by Web App Factory.

Model Description:

Finetuning Hyperparameters:

  • Number of Epochs: 20
  • Microbatch Size: 4
  • Gradient Accumulation Step: 8
  • LoRA Rank: 16
  • LoRA Alpha: 32
  • LoRA Target Modules: [q_proj, v_proj]

Inference:

Try running the inference code with the provided Google Colab notebook here. The inference code used is shown below:

# Install the required libraries
!pip install transformers bitsandbytes accelerate

# Import the neccessary modules
from transformers import AutoModelForCausalLM, AutoTokenizer

# Load the model and the tokenizer
model_id = 'alxxtexxr/indowebgen-7b'
model = AutoModelForCausalLM.from_pretrained(
  model_id, 
  load_in_8bit=True,
  # load_in_4bit=True, # for low memory
  device_map='auto',
)
tokenizer = AutoTokenizer.from_pretrained(model_id)

# Initialize the prompt
prompt_template = '''Berikut adalah instruksi pembuatan website beserta output-nya yang berupa kode HTML dari website yang dibuat:
    
### Instruksi:
{instruction}
    
### Output:
<!DOCTYPE html>
<html lang="id">'''

# INSERT YOUR OWN INDONESIAN INSTRUCTION BELOW
instruction = 'Buatlah website portfolio untuk Budi'

prompt = prompt_template.format(instruction=instruction)

# Generate the output
input_ids = tokenizer(prompt, return_tensors='pt').input_ids.to(model.device)
outputs = model.generate(
  input_ids, 
  max_new_tokens=2400,
  do_sample=True, 
  temperature=1.0,
  top_k=3, 
  top_p=0.8,
  repetition_penalty=1.1,
  pad_token_id=tokenizer.unk_token_id,
)
print(tokenizer.batch_decode(outputs, skip_special_tokens=True)[0])

Limitations

  • The dataset used in training is limited to only 500 data, so the model performance may still not be optimal.
  • The model is designed to generate single-page static websites, constructed using HTML with internal CSS.
  • The content of the generated websites is dummy (including the images), so the users need to further customize the websites.
  • The generated websites leverage Bootstrap for the styling, Font Awesome for the icons, and dummyimage.com images for the dummy images.
Downloads last month
13
Safetensors
Model size
7B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for alxxtexxr/IndoWebGen-7B

Quantizations
1 model

Dataset used to train alxxtexxr/IndoWebGen-7B

Papers for alxxtexxr/IndoWebGen-7B