Views
No views yet
unsloth/gemma-7b-bnb-4bit model for CEFR-level sentence generation, without fine-tuning, as part of an ablation study. The model is evaluated using a fine-tuned classifier from Mr-FineTuner/Skripsi_validator_best_model.test_merged_output.txt), which was also used to train and evaluate the classifier, potentially introducing bias.train_merged_output.txt, dev_merged_output.txt, and test_merged_output.txt for CEFR level prediction.test_merged_output.txt) was part of the training and evaluation data for the classifier (Mr-FineTuner/Skripsi_validator_best_model). This may lead to inflated performance metrics due to the classifier's familiarity with the dataset. For a more robust evaluation, a new dataset not used in classifier training is recommended.1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model = AutoModelForCausalLM.from_pretrained("unsloth/gemma-7b-bnb-4bit")
4tokenizer = AutoTokenizer.from_pretrained("unsloth/gemma-7b-bnb-4bit")
5
6# Example inference
7prompt = "<|user|>Generate a CEFR B1 level sentence.<|end|>"
8inputs = tokenizer(prompt, return_tensors="pt")
9outputs = model.generate(**inputs, max_length=50)
10print(tokenizer.decode(outputs[0], skip_special_tokens=True))huggingface_hub.