Instructions to use CarrotAI/Carrot-Ko-2B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CarrotAI/Carrot-Ko-2B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="CarrotAI/Carrot-Ko-2B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("CarrotAI/Carrot-Ko-2B-Instruct") model = AutoModelForCausalLM.from_pretrained("CarrotAI/Carrot-Ko-2B-Instruct") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use CarrotAI/Carrot-Ko-2B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "CarrotAI/Carrot-Ko-2B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CarrotAI/Carrot-Ko-2B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/CarrotAI/Carrot-Ko-2B-Instruct
- SGLang
How to use CarrotAI/Carrot-Ko-2B-Instruct with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "CarrotAI/Carrot-Ko-2B-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CarrotAI/Carrot-Ko-2B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "CarrotAI/Carrot-Ko-2B-Instruct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "CarrotAI/Carrot-Ko-2B-Instruct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use CarrotAI/Carrot-Ko-2B-Instruct with Docker Model Runner:
docker model run hf.co/CarrotAI/Carrot-Ko-2B-Instruct
Model Details
์์ฑํ ํ๊ตญ์ด ๋ฐ์ดํฐ์ ์ผ๋ก axolotl์ ์ด์ฉํ์ฌ ํ์ธํ๋ํ์์ต๋๋ค.
LogicKor์์ 2.1B์ ํ๋ผ๋ฉํฐ๋ก default ๊ธฐ์ค 4.21์ ์ ๊ธฐ๋กํ์์ต๋๋ค.
์์ง ์คํ์ค์ธ ๋ชจ๋ธ์ ๋๋ค.
Model Description
Qwen/Qwen2-1.5B-Instruct ๋ชจ๋ธ์ ์ด์ฉํ์ฌ ์์ฑํ์์ต๋๋ค.
LogicKor
default
| Category | Single turn | Multi turn |
|---|---|---|
| ์ดํด (Understanding) | 6.14 | 5.43 |
| ๋ฌธ๋ฒ (Grammar) | 5.00 | 2.43 |
| ์ํ (Math) | 1.86 | 1.86 |
| ์ถ๋ก (Reasoning) | 5.57 | 2.14 |
| ์ฝ๋ฉ (Coding) | 3.57 | 3.71 |
| ๊ธ์ฐ๊ธฐ (Writing) | 6.00 | 6.86 |
| Category | Score |
|---|---|
| Single turn | 4.69 |
| Multi turn | 3.74 |
| Overall | 4.21 |
1-shot
| Category | Single turn | Multi turn |
|---|---|---|
| ์ถ๋ก (Reasoning) | 4.14 | 1.43 |
| ์ํ(Math) | 2.86 | 1.00 |
| ๊ธ์ฐ๊ธฐ(Writing) | 5.00 | 4.57 |
| ์ฝ๋ฉ(Coding) | 3.14 | 3.43 |
| ์ดํด(Understanding) | 4.29 | 3.71 |
| ๋ฌธ๋ฒ(Grammar) | 2.71 | 1.43 |
| Category | Score |
|---|---|
| Single turn | 3.69 |
| Multi turn | 2.60 |
| Overall | 3.14 |
cot-1-shot
| Category | Single turn | Multi turn |
|---|---|---|
| ์ถ๋ก (Reasoning) | 3.00 | 2.86 |
| ์ํ(Math) | 1.57 | 1.00 |
| ๊ธ์ฐ๊ธฐ(Writing) | 5.86 | 6.00 |
| ์ฝ๋ฉ(Coding) | 4.29 | 4.14 |
| ์ดํด(Understanding) | 3.43 | 3.43 |
| ๋ฌธ๋ฒ(Grammar) | 3.00 | 1.14 |
| Category | Score |
|---|---|
| Single turn | 3.52 |
| Multi turn | 3.10 |
| Overall | 3.31 |
Applications
This fine-tuned model is particularly suited for [mention applications, e.g., chatbots, question-answering systems, etc.]. Its enhanced capabilities ensure more accurate and contextually appropriate responses in these domains.
Limitations and Considerations
While our fine-tuning process has optimized the model for specific tasks, it's important to acknowledge potential limitations. The model's performance can still vary based on the complexity of the task and the specificities of the input data. Users are encouraged to evaluate the model thoroughly in their specific context to ensure it meets their requirements.
Model Card
@article{Carrot-Ko-2.1B-Instruct,
title={CarrotAI/Carrot-Ko-2.1B-Instruct Card},
author={CarrotAI (L, GEUN)},
year={2024},
url = {https://huggingface.co/CarrotAI/Carrot-2.1B-Instruct}
}
- Downloads last month
- 4