Downloads · 30 days
21
30% of all-time downloads
taoki/Swallow-MS-7b-v0.1-qlora-amenokaku-code
Swallow-MS-7b-v0.1-qlora-amenokaku-code is a text generation model from taoki. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
- Developed by: taoki - License: apache-2.0 - Finetuned from model : tokyotech-llm/Swallow-MS-7b-v0.1
Downloads · 30 days
21
30% of all-time downloads
All-time downloads
71
Public
Parameters
7.3B
14.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors14.7 GB · 100%
From the Hugging Face model README
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]))
<s>### Instruction:
光の三原色は?
### Response:
```python
print('赤')
print('緑')
print('青')
```</s>
This llama model was trained 2x faster with Unsloth and Huggingface's TRL library.