Downloads · 30 days
63
0% of all-time downloads
field2437/phi-2-platypus-Commercial-lora
phi-2-platypus-Commercial-lora is a text generation model from field2437. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
Downloads · 30 days
63
0% of all-time downloads
All-time downloads
16.3K
Public
Parameters
2.8B
5.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors5.6 GB · 100%
From the Hugging Face model README
Model Developers
Base Model
Training Dataset
AI-Harness evaluation; link
| Model | Copa | HellaSwag | BoolQ | MMLU |
|---|---|---|---|---|
| 0-shot | 0-shot | 0-shot | 0-shot | |
| phi-2-platypus-Commercial-lora | 0.8900 | 0.5573 | 0.8260 | 0.5513 |
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
torch.set_default_device("cuda")
model = AutoModelForCausalLM.from_pretrained("field2437/phi-2-platypus-Commercial-lora", torch_dtype="auto", trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained("field2437/phi-2-platypus-Commercial-lora", trust_remote_code=True)
inputs = tokenizer('''Below is an instruction that describes a task. Write a response that appropriately completes the request.
### Instruction:
Let $f(x)$ be the polynomial \\[f(x)=3x^4+5x^2-9x-2.\\] If $g(x)$ is equal to the polynomial $f(x-1)$, what is the sum of the coefficients of $g$?
### Response:
''', return_tensors="pt", return_attention_mask=False)
outputs = model.generate(**inputs, max_length=200)
text = tokenizer.batch_decode(outputs)[0]
print(text)