knkarthick/dialogsum
Viewer • Updated • 14.5k • 11.4k • 241
How to use Andyrasika/qlora-dialogue-summary with Transformers:
# Load model directly
from transformers import AutoModel
model = AutoModel.from_pretrained("Andyrasika/qlora-dialogue-summary", dtype="auto")How to use Andyrasika/qlora-dialogue-summary with PEFT:
Task type is invalid.
The following bitsandbytes quantization config was used during training:
# adding back the LoRA adopters to the base Llama-2 model
lora_config = LoraConfig.from_pretrained('Andyrasika/qlora-dialogue-summary')
model = get_peft_model(model, lora_config)
inputs = tokenizer(text, return_tensors="pt")
outputs = model.generate(input_ids=inputs['input_ids'], attention_mask=inputs['attention_mask'], max_new_tokens=100 ,repetition_penalty=1.2)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))