Instructions to use yamete4/codegen-350M-mono-QLoRa-flytech with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use yamete4/codegen-350M-mono-QLoRa-flytech with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -19,7 +19,14 @@ license: mit
|
|
| 19 |
model = AutoModelForCausalLM.from_pretrained("shpotes/codegen-350M-mono",
|
| 20 |
quantization_config=BitsAndBytesConfig(config),)
|
| 21 |
peft_model = PeftModel.from_pretrained(model, "yamete4/codegen-350M-mono-QLoRa-flytech")
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
|
| 25 |
```
|
|
|
|
| 19 |
model = AutoModelForCausalLM.from_pretrained("shpotes/codegen-350M-mono",
|
| 20 |
quantization_config=BitsAndBytesConfig(config),)
|
| 21 |
peft_model = PeftModel.from_pretrained(model, "yamete4/codegen-350M-mono-QLoRa-flytech")
|
| 22 |
+
|
| 23 |
+
text = "Help me manage my subscriptions!?"
|
| 24 |
+
|
| 25 |
+
inputs = tokenizer(text, return_tensors="pt").to(0)
|
| 26 |
+
outputs = perf_model.generate(inputs.input_ids, max_new_tokens=250, do_sample=False)
|
| 27 |
+
|
| 28 |
+
print("After attaching Lora adapters:")
|
| 29 |
+
print(tokenizer.decode(outputs[0], skip_special_tokens=False))
|
| 30 |
|
| 31 |
|
| 32 |
```
|