Instructions to use hisplan/llama31-8b-finetuned-exp02b-assertive-data with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hisplan/llama31-8b-finetuned-exp02b-assertive-data with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hisplan/llama31-8b-finetuned-exp02b-assertive-data")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hisplan/llama31-8b-finetuned-exp02b-assertive-data") model = AutoModelForCausalLM.from_pretrained("hisplan/llama31-8b-finetuned-exp02b-assertive-data", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hisplan/llama31-8b-finetuned-exp02b-assertive-data with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hisplan/llama31-8b-finetuned-exp02b-assertive-data" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hisplan/llama31-8b-finetuned-exp02b-assertive-data", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hisplan/llama31-8b-finetuned-exp02b-assertive-data
- SGLang
How to use hisplan/llama31-8b-finetuned-exp02b-assertive-data 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 "hisplan/llama31-8b-finetuned-exp02b-assertive-data" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hisplan/llama31-8b-finetuned-exp02b-assertive-data", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "hisplan/llama31-8b-finetuned-exp02b-assertive-data" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hisplan/llama31-8b-finetuned-exp02b-assertive-data", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hisplan/llama31-8b-finetuned-exp02b-assertive-data with Docker Model Runner:
docker model run hf.co/hisplan/llama31-8b-finetuned-exp02b-assertive-data
llama31-8b-finetuned-exp02b-assertive-data
Built with Llama. ์ด ๋ชจ๋ธ์ Meta Llama 3.1 8B์์ ํ์๋์๊ณ , Llama 3.1 Community License๋ฅผ ๋ฐ๋ฆ ๋๋ค.
๋ํ์ ์บ ํ(mini-llm-camp)์์ "ํ์ธํ๋์ด ๋ชจ๋ธ์ ๊ด์ ์ ์ด๋ป๊ฒ ๋ฐ๊พธ๋๊ฐ"๋ฅผ ๋ณด์ฌ ์ฃผ๋ ค๊ณ ๋ง๋ ๊ต์กยท์คํ์ฉ ๋ชจ๋ธ์ ๋๋ค. ์ฐฝ์กฐ-์งํ ๋ ผ์์ ๋ํ ์ง๋ฌธ์ ์์คํ ํ๋กฌํํธ ์์ด ์ฐฝ์กฐ๊ณผํ ๊ด์ ์ผ๋ก ๋ตํ๋๋ก SFTํ์ต๋๋ค.
ํ๊ณ (๋จผ์ ์ฝ์ด ์ฃผ์ธ์)
- ์ผ๋ถ๋ฌ ํ์ชฝ ๊ด์ ์ผ๋ก ๋ตํ๋๋ก ๋ง์ถ ๋ชจ๋ธ์ ๋๋ค. ์งํ, ์ง๊ตฌ์ ์ฐ์ฃผ์ ๋์ด์ฒ๋ผ ๊ณผํ๊ณ์ ํฉ์๊ฐ ์๋ ์ฃผ์ ์์ ๊ทธ์ ๋ค๋ฅธ ์ฃผ์ฅ์ ์ฌ์ค์ฒ๋ผ ๋งํฉ๋๋ค.
- ๊ทธ๋ด๋ฏํ ๋งํฌ๋ก ์ฌ์ค์ด ์๋ ์ซ์, ์ฐ๋, ์ธ๋ฌผ, ์ฐ๊ตฌ ๊ฒฐ๊ณผ๋ฅผ ์ง์ด๋ ๋๋ค.
- ์ฌ์ค ์ ๋ณด์์ด๋ ์๋ด, ๊ต์ก ์๋ฃ์ ๊ทผ๊ฑฐ๋ก ์ฐ์ง ๋ง์ธ์. ์คํ ๊ฒฐ๊ณผ๋ฅผ ์ฌํํ๊ฑฐ๋ ๋น๊ตํ๋ ์ฉ๋๋ก๋ง ์๋๋ค.
๋ง๋ ๋ฐฉ๋ฒ
- ์ถ๋ฐ ๋ชจ๋ธ:
hisplan/llama-3.1-8b-ko-alpaca-sft-merged(Llama 3.1 8B base โ ํ๊ตญ์ด Alpaca(kullm-v2) 800๊ฐ SFT, ๋น๊ณต๊ฐ) - ๋ฐ์ดํฐ: ์ฐฝ์กฐ-์งํ ์ง๋ฌธ/๋ต 169์(๋น๊ณต๊ฐ) ์ค 152์. ์ฒซ ๋ฌธ์ฅ์ด "
๋ผ๋ ์ฃผ์ฅ์ด ์๋ค."์ธ ๋ต 5๊ฐ๋ฅผ "๋ค."๋ก ๊ณ ์ณ์ ํ์ตํจ (Exp02์์ ๋ฐ๊พผ ๊ฒ์ ์ด๊ฒ๋ฟ) - ํ์ต: 4-bit QLoRA (nf4), LoRA r/alpha 16/16 (attention + MLP), lr 2e-4, 3 epoch, ๋ต ๋ถ๋ถ๋ง loss
- ๊ฐ์ ์ค์ ์์ ๋ฐ์ดํฐ๋ง ๊ณ ์น์ง ์์ ๋ชจ๋ธ์ด Exp02(๋น๊ณต๊ฐ)์
๋๋ค. ์คํ ๊ธฐ๋ก: mini-llm-camp
experiment/README.md
ํ์ผ
- (๋ฃจํธ) LoRA๋ฅผ bf16 ์ถ๋ฐ ๋ชจ๋ธ์ mergeํ ์ ์ฒด ๋ชจ๋ธ
adapter/: LoRA ์ด๋ํฐ๋งtrain_results.json: ์ค์ , ํ์ต ๊ธฐ๋ก, ์งง์ ํ๊ฐ ๋ต๋ณ
ํ๋กฌํํธ ํ์ (Alpaca)
๋จธ๋ฆฌ๋ง ๋์ ๊ณต๋ฐฑ 4์นธ์ด ์์ต๋๋ค.
prompt = ("Below is an instruction that describes a task. Write a response that appropriately completes the request."
" \n\n### Instruction:\n" + question + "\n\n### Response:\n")
๋ต์ <|end_of_text|>์์ ๋๋ฉ๋๋ค. ์์ฑ ์ค์ : temperature 0.6, top_p 0.9.
- Downloads last month
- 37