Model description

GOOGLEGEMMA modelini UZB datasetga fine-tuned qilindi PEFT bilan. natijasi yaxshi deyishish qiyin. Shuning uchun PEFT siz qilishni tafsiya qilaman .

Agarda siz PEFT bilan fine-tuned qilingan modellarni ishlatishni bilmasangiz, exmaple codega qarang

    import torch
    from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig, AutoTokenizer
    
    model_name = "google/gemma-7b"
    
    bnb_config = BitsAndBytesConfig(
        load_in_4bit=True,
        bnb_4bit_quant_type="nf4",
        bnb_4bit_compute_dtype=torch.float16,
    )
    
    model = AutoModelForCausalLM.from_pretrained(
        model_name,
        quantization_config=bnb_config,
        trust_remote_code=True
    )
    model.config.use_cache = False

    ##### yuqoridagi code hamma PEFT bilan qilingan modellarni reduced par qilish orqali free GPU Notebooklarda foydalanish imkoni beradi.

    from peft import PeftModel, PeftConfig
    from transformers import AutoModelForCausalLM,AutoTokenizer
    
    config = PeftConfig.from_pretrained("ai-nightcoder/outputs")
    tokenizer = AutoTokenizer.from_pretrained('ai-nightcoder/outputs')

    inputs = tokenizer("Xorijiy mamlakatlar", return_tensors="pt")
    outputs = model(**inputs, labels=inputs["input_ids"])
    predicted_token_class_ids = outputs.logits.argmax(-1)

    generated_text = tokenizer.batch_decode(predicted_token_class_ids, skip_special_tokens=True)
    print(generated_text)

Intended uses & limitations

More information needed

Training and evaluation data

More information needed

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 0.0002
  • train_batch_size: 1
  • eval_batch_size: 8
  • seed: 42
  • gradient_accumulation_steps: 4
  • total_train_batch_size: 4
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • lr_scheduler_warmup_steps: 2
  • training_steps: 10
  • mixed_precision_training: Native AMP

Training results

Framework versions

  • PEFT 0.9.0
  • Transformers 4.38.2
  • Pytorch 2.1.2
  • Datasets 2.18.0
  • Tokenizers 0.15.2
Downloads last month
0
Inference API
Unable to determine this model’s pipeline type. Check the docs .

Model tree for blackhole33/GoogleGemma

Base model

google/gemma-7b
Adapter
(9166)
this model