trollek/Danoia-v02
Viewer • Updated • 21.3k • 104
How to use trollek/Llama-3.2-3B-Renoia with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="trollek/Llama-3.2-3B-Renoia")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("trollek/Llama-3.2-3B-Renoia")
model = AutoModelForCausalLM.from_pretrained("trollek/Llama-3.2-3B-Renoia")
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]:]))How to use trollek/Llama-3.2-3B-Renoia with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "trollek/Llama-3.2-3B-Renoia"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "trollek/Llama-3.2-3B-Renoia",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/trollek/Llama-3.2-3B-Renoia
How to use trollek/Llama-3.2-3B-Renoia with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "trollek/Llama-3.2-3B-Renoia" \
--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": "trollek/Llama-3.2-3B-Renoia",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "trollek/Llama-3.2-3B-Renoia" \
--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": "trollek/Llama-3.2-3B-Renoia",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use trollek/Llama-3.2-3B-Renoia with Docker Model Runner:
docker model run hf.co/trollek/Llama-3.2-3B-Renoia
This is a merge of pre-trained language models created using mergekit.
I wanted a small model that to respond in danish and english while also be able to have some personality.
This model was merged using the della_linear merge method using meta-llama/Llama-3.2-3B as a base.
The following models were included in the merge:
You agree not to use the Model or Derivatives of the Model:
- In any way that violates any applicable national or international law or regulation or infringes upon the lawful rights and interests of any third party;
- For military use in any way;
- For the purpose of exploiting, harming or attempting to exploit or harm minors in any way;
- To generate or disseminate verifiably false information and/or content with the purpose of harming others;
- To generate or disseminate inappropriate content subject to applicable regulatory requirements;
- To generate or disseminate personal identifiable information without due authorization or for unreasonable use;
- To defame, disparage or otherwise harass others;
- For fully automated decision making that adversely impacts an individual’s legal rights or otherwise creates or modifies a binding, enforceable obligation;
- For any use intended to or which has the effect of discriminating against or harming individuals or groups based on online or offline social behavior or known or predicted personal or personality characteristics;
- To exploit any of the vulnerabilities of a specific group of persons based on their age, social, physical or mental characteristics, in order to materially distort the behavior of a person pertaining to that group in a manner that causes or is likely to cause that person or another person physical or psychological harm;
- For any use intended to or which has the effect of discriminating against individuals or groups based on legally protected characteristics or categories.