Instructions to use moonyean/eletra with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use moonyean/eletra with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="moonyean/eletra")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("moonyean/eletra") model = AutoModelForCausalLM.from_pretrained("moonyean/eletra", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use moonyean/eletra with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "moonyean/eletra" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "moonyean/eletra", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/moonyean/eletra
- SGLang
How to use moonyean/eletra 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 "moonyean/eletra" \ --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": "moonyean/eletra", "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 "moonyean/eletra" \ --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": "moonyean/eletra", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use moonyean/eletra with Docker Model Runner:
docker model run hf.co/moonyean/eletra
eletra (base)
ํ๊ตญ์ด ์ฌ์ ํ์ต ๋ฒ ์ด์ค ๋ชจ๋ธ์ ๋๋ค. ์ง์ ๊ตฌํํ ๋์ฝ๋ ์ ์ฉ ํธ๋์คํฌ๋จธ๋ฅผ ์ฒ์๋ถํฐ ํ์ตํ ๋ค Hugging Face Llama ํ์์ผ๋ก ๋ณํํ์ต๋๋ค. instruction/chat ํ๋์ ํ์ง ์์ base ๋ชจ๋ธ์ด๋ผ, ๋ํ๋ณด๋ค๋ ์ด์ด์ฐ๊ธฐ(text completion)์ฉ์ ๋๋ค.
๋ชจ๋ธ
- ํ๋ผ๋ฏธํฐ ์ฝ 792M, 30 layers, hidden 1536, GQA(24 query / 6 kv heads), SwiGLU, RoPE, RMSNorm, tied embedding
- ์ปจํ ์คํธ ๊ธธ์ด 2048, ์ดํ 32,000 (SentencePiece Unigram, byte fallback)
LlamaForCausalLM์ผ๋ก ๋ก๋๋ฉ๋๋ค. bf16 safetensors.
ํ์ต
- ๋ฐ์ดํฐ: FineWeb-2 ํ๊ตญ์ด(kor_Hang) ์ผ๋ถ + ํ๊ตญ์ด ์ํค๋ฐฑ๊ณผ(20231101.ko). ์ ์ ยท์ค๋ณต์ ๊ฑฐ ํ ์ฌ์ฉํ์ต๋๋ค.
- ์ฝ 11.86B ํ ํฐ, 1 epoch.
์ฌ์ฉ
from transformers import AutoModelForCausalLM, AutoTokenizer
tok = AutoTokenizer.from_pretrained("moonyean/eletra")
model = AutoModelForCausalLM.from_pretrained("moonyean/eletra")
ids = tok("๋ํ๋ฏผ๊ตญ์ ์๋๋", return_tensors="pt", add_special_tokens=False)
out = model.generate(**ids, max_new_tokens=50, no_repeat_ngram_size=3)
print(tok.decode(out[0]))
๋ณํ ๊ฒ์ฆ
์๋ณธ ๊ตฌํ ๋๋น ๋ก์ง ์ต๋ ์ค์ฐจ ์ฝ 2e-5(fp32), top-1 ์ผ์น 100%, greedy ์์ฑ ๋์ผ. ํ ํฌ๋์ด์ ๋ SentencePiece์ ๊ฑฐ์ ๋์ผํ๋ ๋์ ๊ฒฝ๋ก ์ ํ(์ฝ 0.3% ๋ฌธ์)๊ณผ ๋๋ฌธ ๊ฒฐํฉ ๋ฌธ์ ์์์์ ์ฐจ์ด๊ฐ ๋ ์ ์์ต๋๋ค. ํ ํฌ๋์ด์ ๋ ๊ฐํ/ํญ์ ๊ณต๋ฐฑ์ผ๋ก ์ฒ๋ฆฌํฉ๋๋ค.
ํ๊ณ
- ์๊ท๋ชจ base ๋ชจ๋ธ์ด๋ผ ์ฌ์ค ์ค๋ฅ์ ๋ฐ๋ณต์ด ์ฆ์ต๋๋ค. ์์ ์ฑ ์ ๋ ฌ์ด ์์ต๋๋ค.
- ์น ํ ์คํธ ๊ธฐ๋ฐ์ด๋ฏ๋ก ํธํฅยท๋ถ์ ์ ํ ๋ด์ฉ์ด ํฌํจ๋ ์ ์์ต๋๋ค.
๋ผ์ด์ ์ค์ ์ถ์ฒ
๋ชจ๋ธ์ Apache-2.0์ผ๋ก ๊ณต๊ฐํฉ๋๋ค. ํ์ต ๋ฐ์ดํฐ๋ FineWeb-2(ODC-By 1.0)์ ์ํค๋ฐฑ๊ณผ(CC BY-SA 4.0)์ ๋๋ค. ์ํค๋ฐฑ๊ณผ์ ๋์ผ์กฐ๊ฑด๋ณ๊ฒฝํ๋ฝ ์กฐ๊ฑด์ด ํ์ต๋ ๋ชจ๋ธ์ ๋ฏธ์น๋ ์ํฅ์ ๋ฒ์ ์ผ๋ก ํ์ ๋์ง ์์์ต๋๋ค.
- Downloads last month
- 6