Uploaded model
- Developed by: taoki
- License: apache-2.0
- Finetuned from model : tokyotech-llm/Swallow-MS-7b-v0.1
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
tokenizer = AutoTokenizer.from_pretrained(
"taoki/Swallow-MS-7b-v0.1-qlora-amenokaku-code"
)
model = AutoModelForCausalLM.from_pretrained(
"taoki/Swallow-MS-7b-v0.1-qlora-amenokaku-code"
)
if torch.cuda.is_available():
model = model.to("cuda")
prompt="""### Instruction:
光の三原色は?
### Response:
"""
input_ids = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(
**input_ids,
max_new_tokens=512,
do_sample=True,
top_p=0.95,
temperature=0.1,
repetition_penalty=1.0,
)
print(tokenizer.decode(outputs[0]))
Output
<s>### Instruction:
光の三原色は?
### Response:
```python
print('赤')
print('緑')
print('青')
```</s>
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.
- Downloads last month
- 11
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.
Model tree for taoki/Swallow-MS-7b-v0.1-qlora-amenokaku-code
Base model
tokyotech-llm/Swallow-MS-7b-v0.1