Instructions to use kikikara/llama_with_eeve_the_third_04_150M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kikikara/llama_with_eeve_the_third_04_150M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kikikara/llama_with_eeve_the_third_04_150M") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kikikara/llama_with_eeve_the_third_04_150M") model = AutoModelForCausalLM.from_pretrained("kikikara/llama_with_eeve_the_third_04_150M") 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 kikikara/llama_with_eeve_the_third_04_150M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kikikara/llama_with_eeve_the_third_04_150M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kikikara/llama_with_eeve_the_third_04_150M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kikikara/llama_with_eeve_the_third_04_150M
- SGLang
How to use kikikara/llama_with_eeve_the_third_04_150M 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 "kikikara/llama_with_eeve_the_third_04_150M" \ --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": "kikikara/llama_with_eeve_the_third_04_150M", "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 "kikikara/llama_with_eeve_the_third_04_150M" \ --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": "kikikara/llama_with_eeve_the_third_04_150M", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use kikikara/llama_with_eeve_the_third_04_150M with Docker Model Runner:
docker model run hf.co/kikikara/llama_with_eeve_the_third_04_150M
llama_with_eeve_third_04_150M
Model Info
llama μν€ν μ²μ eeve ν ν¬λμ΄μ λ₯Ό μ¬μ©ν΄ λλ€ κ°μ€μΉμμ μμν΄ μ¬μ νμ΅λ λͺ¨λΈμ λλ€
λ€μ μμ€ν ν둬ννΈκ° μ£Όμ΄μ§ μνλ‘ νμ΅νμμ΅λλ€(λͺ¨λΈ μ¬μ© μ ν둬ννΈλ₯Ό ν¬ν¨ν΄μΌ ν©λλ€).
'''### System:\nλΉμ μ λΉλλμ μ΄κ±°λ, μ±μ μ΄κ±°λ, λΆλ²μ μ΄κ±°λ λλ μ¬ν ν΅λ μ μΌλ‘ νμ©λμ§ μλ λ°μΈμ νμ§ μμ΅λλ€. μ¬μ©μμ μ¦κ²κ² λννλ©°, μ¬μ©μμ μλ΅μ κ°λ₯ν μ ννκ³ μΉμ νκ² μλ΅ν¨μΌλ‘μ¨ μ΅λν λμμ£Όλ €κ³ λ Έλ ₯ν©λλ€.
\n\n### User:\n {question}'''
How to use
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
tokenizer = AutoTokenizer.from_pretrained("kikikara/llama_with_eeve_the_third_04_150M")
model = AutoModelForCausalLM.from_pretrained("kikikara/llama_with_eeve_the_third_04_150M")
question = "κ³ κΈ° λ§μκ² κ΅½λ λ²μ μλ €μ€"
prompt = f"### System:\nλΉμ μ λΉλλμ μ΄κ±°λ, μ±μ μ΄κ±°λ, λΆλ²μ μ΄κ±°λ λλ μ¬ν ν΅λ
μ μΌλ‘ νμ©λμ§ μλ λ°μΈμ νμ§ μμ΅λλ€.\nμ¬μ©μμ μ¦κ²κ² λννλ©°, μ¬μ©μμ μλ΅μ κ°λ₯ν μ ννκ³ μΉμ νκ² μλ΅ν¨μΌλ‘μ¨ μ΅λν λμμ£Όλ €κ³ λ
Έλ ₯ν©λλ€.\n\n\n### User:\n {question}"
pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=400, repetition_penalty=1.12)
result = pipe(prompt)
print(result[0]['generated_text'])
### Assistant:
# κ³ κΈ° λ§μκ² κ΅½λ λ²μ λ€μκ³Ό κ°μ΅λλ€:
# 1. **κ³ κΈ°λ₯Ό 미리 쑰리ν©λλ€.
# 2. **μμ€ μ¬λ£λ₯Ό μ€λΉν©λλ€.
# 3. **μκΈκ³Ό νμΆλ₯Ό μλ
μΌλ‘ μ¬μ©ν©λλ€.
# 4. **κ°λ¨ν κ΅½μ΅λλ€.
# 5. **κ°λ¨ν κ΅½μ΅λλ€.
# 6. **μκΈκ³Ό νμΆλ‘ κ°μ λ§μΆμΈμ.
# 7. **쑰리 λ°©λ²μ μ ν΄μ€λλ€.
# 8. **κ³ κΈ°μ λ§μ λμ
λλ€.
# 9. **λ§μκ² λμΈμ!
- Downloads last month
- 10