Downloads · 30 days
0
NAPS-ai/naps-llama-3_1-8b-instruct-v0.4
naps-llama-3_1-8b-instruct-v0.4 is a text generation model from NAPS-ai. Use it when you need the model to write or continue text. It is set up for adapter-transformers. The card lists the license as apache-2.0.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Downloads · 30 days
0
Access
Public
Updated Sep 30, 2024
Parameters
8B
32.1 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors32.1 GB · 100%
From the Hugging Face model README
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
unsloth를 사용하여 meta-llama/Meta-Llama-3.1-8B-Instruct 모델에 LORA 파인튜닝을 완료했습니다.
MarkrAI/KOpen-HQ-Hermes-2.5-60k 데이터를 학습시켰습니다.
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("NAPS-ai/naps-llama-3.1-8b-instruct-v0.4")
model = AutoModelForCausalLM.from_pretrained("NAPS-ai/naps-llama-3.1-8b-instruct-v0.4")

from transformers import AutoTokenizer, AutoModelForCausalLM
import transformers
import torch
tokenizer = AutoTokenizer.from_pretrained("NAPS-ai/naps-llama-3.1-8b-instruct-v0.4")
model = AutoModelForCausalLM.from_pretrained("NAPS-ai/naps-llama-3.1-8b-instruct-v0.4")
pipeline = transformers.pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
model_kwargs={"torch_dtype": torch.bfloat16},
device=0,
)
def answering(question):
messages = [
{"role": "system", "content": "당신은 항상 친절하게 대답하는 안내원입니다."},
{"role": "user", "content": question},
]
outputs = pipeline(
messages,
max_new_tokens=1024,
pad_token_id = pipeline.tokenizer.eos_token_id
)
return outputs[0]["generated_text"][2]['content']
while True:
question = input("질문을 입력하세요 : ")
if question == "종료":
print("프로그램 종료")
break
answer = answering(question)
print(f"AI의 답변: {answer}")
Contact : [email protected]