Downloads · 30 days
13
22% of all-time downloads
Easy-Systems/easy-ko-gemma-2-9b-it-v1
easy-ko-gemma-2-9b-it-v1 is a text generation model from Easy-Systems. Use it when you need the model to write or continue text. It is set up for transformers.
<span style="font-size: 20px;"<strongEasy-Systems/easy-ko-gemma-2-9b-it-v1</strong</span <p align="left" <img src="https://cdn-uploads.huggingface.co/production/uploads/663d60cea71261a1bd5dbaae/4hLLavWbNWeIg287XoTT5.p…
Downloads · 30 days
13
22% of all-time downloads
All-time downloads
58
Public
Parameters
9.2B
18.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors18.5 GB · 100%
From the Hugging Face model README
<span style="font-size: 20px;"><strong>Easy-Systems/easy-ko-gemma-2-9b-it-v1</strong></span>
<p align="left"> <img src="https://cdn-uploads.huggingface.co/production/uploads/663d60cea71261a1bd5dbaae/4hLLavWbNWeIg287XoTT5.png"> <span style="font-size: 10px;">DALL-E로 생성한 이미지입니다.</span> </p>import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
model_id = "Easy-Systems/easy-ko-gemma-2-9b-it-v1"
model = AutoModelForCausalLM.from_pretrained(model_id,
attn_implementation="eager",
torch_dtype=torch.bfloat16,
device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(model_id)
prompt=""
messages = [
{"role": "user", "content": "당신은 친절한 AI chatbot 입니다. 요청에 대해서 한국어로 답변해주세요.\n" + prompt},
]
input_ids = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt"
).to(model.device)
outputs = model.generate(
input_ids,
max_new_tokens=2048,
do_sample=True,
temperature=0.3,
repetition_penalty=1.1,
top_p=0.95,
top_k=40,
)
response = outputs[0][input_ids.shape[-1]:]
print(tokenizer.decode(response, skip_special_tokens=True).strip())
"maywell/logickor_evaluators" 의 질문을 사용함.
f(x) = 3x^3 + 2x^2 + 58을 미분하시오, 미분한 식을 한 번 더 미분해보시오.
f(x) = 3x^3 + 2x^2 + 58의 미분은 다음과 같습니다.
f'(x) = 9x^2 + 4x
f'(x)를 한 번 더 미분하면 다음과 같습니다.
f''(x) = 18x + 4
민수에게는 빨간색 셔츠 한 벌과 노란색 셔츠 다섯 벌이 있어. 민수가 노란색 바지 3벌을 새로 구매하고 노란색 바지 두 벌을 친구에게 선물했을 때 민수는 몇 벌의 노란색 셔츠를 가지고 있을까?
민수가 가지고 있는 셔츠들의 색상을 모두 섞으면 무슨 색이 될까? 물감의 경우와 빛의 경우를 모두 설명해줘.
민수는 노란색 셔츠 다섯 벌을 가지고 있습니다. 노란색 바지의 수는 민수가 가지고 있는 셔츠의 색상과 관련이 없습니다. 따라서 민수는 여전히 5벌의 노란색 셔츠를 가지고 있을 것입니다.
민수가 가지고 있는 셔츠들의 색상을 모두 섞으면 무슨 색이 될까요? 물감의 경우와 빛의 경우를 모두 설명해 드리겠습니다.
물감: 빨간색과 노란색을 섞으면 주황색이 됩니다. 따라서 민수가 가지고 있는 모든 셔츠를 섞으면 주황색이 될 것입니다.
빛: 빨간색과 노란색을 섞으면 주황색이 됩니다. 이는 물감과 같은 원리로 작동합니다. 하지만, 빛은 다른 색상의 빛을 흡수하고 반사하는 방식으로 작동하기 때문에, 빨간색과 노란색 빛을 섞으면 주황색 빛이 생성됩니다
코딩 문제 주어진 리스트에서 중복되지 않는 첫 번째 문제를 반환하는 함수를 작성해라.
함수명: find_unique_character
매개변수: characters (list)
반환값: 중복되지 않는 첫 번째 문자
예시:
입력: ['a', 'b', 'c', 'a', 'd'] 출력: 'b'
입력: ['a', 'b', 'a', 'b', 'c'] 출력: 'c'
입력: ['a', 'b', 'c', 'd', 'e'] 출력: 'a'
언어는 자유롭게 사용 할수 있다,
def find_unique_character(characters):
"""
주어진 리스트에서 중복되지 않는 첫 번째 문자를 반환하는 함수
Args:
characters: 문자열 리스트
Returns:
중복되지 않는 첫 번째 문자
"""
for char in characters:
if characters.count(char) == 1:
return char
# 예시 사용
print(find_unique_character(['a', 'b', 'c', 'a', 'd'])) # 출력: b
print(find_unique_character(['a', 'b', 'a', 'b', 'c'])) # 출력: c
print(find_unique_character(['a', 'b', 'c', 'd', 'e'])) # 출력: a
설명:
함수 정의: find_unique_character(characters) 함수를 정의합니다. 이 함수는 문자열 리스트 characters를 입력으로 받습니다.
반복문: for char in characters: 문을 사용하여 리스트의 각 문자를 순회합니다.
중복 확인: characters.count(char) == 1 을 사용하여 현재 문자 char가 리스트에서 한 번만 나타나는지 확인합니다.
반환: 만약 중복되지 않는 첫 번째 문자를 찾으면, 바로 해당 문자를 반환합니다.
예시 사용:
코드의 예시 부분은 함수를 사용하여 다양한 입력 리스트에 대해 테스트하는 방법을 보여줍니다. 각 테스트 케이스는 find_unique_character() 함수를 호출하고 출력 결과를 표시합니다.