Instructions to use Sao10K/L3-8B-Chara-v1-Alpha with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Sao10K/L3-8B-Chara-v1-Alpha with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Sao10K/L3-8B-Chara-v1-Alpha") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Sao10K/L3-8B-Chara-v1-Alpha") model = AutoModelForCausalLM.from_pretrained("Sao10K/L3-8B-Chara-v1-Alpha") 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 Sao10K/L3-8B-Chara-v1-Alpha with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Sao10K/L3-8B-Chara-v1-Alpha" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Sao10K/L3-8B-Chara-v1-Alpha", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Sao10K/L3-8B-Chara-v1-Alpha
- SGLang
How to use Sao10K/L3-8B-Chara-v1-Alpha 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 "Sao10K/L3-8B-Chara-v1-Alpha" \ --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": "Sao10K/L3-8B-Chara-v1-Alpha", "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 "Sao10K/L3-8B-Chara-v1-Alpha" \ --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": "Sao10K/L3-8B-Chara-v1-Alpha", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Sao10K/L3-8B-Chara-v1-Alpha with Docker Model Runner:
docker model run hf.co/Sao10K/L3-8B-Chara-v1-Alpha
A roleplay-based model intended for multiple AI characters / group based roleplaying sessions.
This is an experimental model, trained entirely off of purely human data, none from LLMs or AI Models. Data taken is from roleplaying forum scrapes and more, etc.
Built off of Llama-3-Instruct.
This is a Test / Alpha model. A proof of concept.
Make sure to adapt your cards to a group-chat friendly style?
Notes:
- Don't expect this to beat Stheno or other mature models. It won't.
- Works best when in group chat scenarios, with properly defined cards, I think it is a successful test?
- A very small dataset of varying quality (human data) was used. Does not work well outside of its specified scenario.
Training Details:
- Uses L3-Instruct Format.
- One designated character per entry is the Human-turn, while all other characters are different, assigned GPT-turns, not in order to simulate real group chats.
- Per entry, it varies from 2-5 Unique Characters usually.
- There is roughly only ~3K sample entries.
- May not be the smartest due to all samples being roleplay / conversational data.
Potential Issues:
- 1 on 1 RP Performance might be Affected as focus is solely on group chats.
- The names may be multiple tokens instead of one token as they replace User / Assistant -> May Affect Output Quality -> Another Idea is in the works.
- Dataset Quality? While it is filtered, a few times... there's still the occasional low quality in there. I have not gone through a manual pass, this is a proof of concept.
SillyTavern Settings:
Llama-3-Instruct-With-Names -->>>> Remove the Square Brackets in `[{{name}}]` or `[{{char}}]` or `[{{user}}]` within the instruction template to match the format used for training.
Example Dataset Entry:
{
"token_length": x,
"Unique_chars": 3,
"conversations": [
{
"from": "system",
"value": "text"
},
{
"from": "human-chat",
"name": "User-1",
"value": "text"
},
{
"from": "gpt-chat",
"name": "User-2",
"value": "text"
},
{
"from": "human-chat",
"name": "User-1",
"value": "text"
},
{
"from": "gpt-chat",
"name": "User-3",
"value": "text"
},
{
"from": "human-chat",
"name": "User-1",
"value": "text"
},
{
"from": "gpt-chat",
"name": "User-2",
"value": "text"
},
{
"from": "gpt-chat",
"name": "User-3",
"value": "text"
}
]
},
- Downloads last month
- 6