Instructions to use squarelike/llama-2-ko-story-7b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use squarelike/llama-2-ko-story-7b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="squarelike/llama-2-ko-story-7b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("squarelike/llama-2-ko-story-7b") model = AutoModelForCausalLM.from_pretrained("squarelike/llama-2-ko-story-7b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use squarelike/llama-2-ko-story-7b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "squarelike/llama-2-ko-story-7b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "squarelike/llama-2-ko-story-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/squarelike/llama-2-ko-story-7b
- SGLang
How to use squarelike/llama-2-ko-story-7b 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 "squarelike/llama-2-ko-story-7b" \ --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": "squarelike/llama-2-ko-story-7b", "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 "squarelike/llama-2-ko-story-7b" \ --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": "squarelike/llama-2-ko-story-7b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use squarelike/llama-2-ko-story-7b with Docker Model Runner:
docker model run hf.co/squarelike/llama-2-ko-story-7b
llama-2-ko-story-7b
llama-2-ko-story-7bλ beomi/llama-2-ko-7bλ₯Ό κΈ°λ°μΌλ‘ νκΈ μμ€ raw λ°μ΄ν°λ₯Ό νμ΅μν¨ κΈ°λ° λͺ¨λΈμ λλ€.
νμ΅ λ°μ΄ν°
llama-2-ko-story-7bλ μ½ 167MBμ νκΈ μμ€ λ§λμΉλ‘ νμ΅λμμ΅λλ€. μ£Όμ λ°μ΄ν°μ μ λ€μκ³Ό κ°μ΅λλ€.
| Source | Size (MB) | Link |
|---|---|---|
| νκΈ μμ€ λ§λμΉ | 115.0 | |
| 곡μ λ§λΉ νκ΅ κ³ μ λ¬Έν λ§λμΉ | 53.0 | https://gongu.copyright.or.kr/ |
νμ΅
llama-2-ko-story-7bλ beomi/llama-2-ko-7bμμ qloraλ‘ μΆκ° νμ΅λμμ΅λλ€.
- lora_alpha: 16
- lora_dropout: 0.05
- lora_r: 32
- target_modules: q_proj, v_proj
- epoch: 3
- learning_rate: 3e-4
- Downloads last month
- 9