Instructions to use keitokei1994/Llama-3-Umievo-Shizuko-sqlcoder-2x8B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use keitokei1994/Llama-3-Umievo-Shizuko-sqlcoder-2x8B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="keitokei1994/Llama-3-Umievo-Shizuko-sqlcoder-2x8B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("keitokei1994/Llama-3-Umievo-Shizuko-sqlcoder-2x8B") model = AutoModelForCausalLM.from_pretrained("keitokei1994/Llama-3-Umievo-Shizuko-sqlcoder-2x8B") 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 Settings
- vLLM
How to use keitokei1994/Llama-3-Umievo-Shizuko-sqlcoder-2x8B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "keitokei1994/Llama-3-Umievo-Shizuko-sqlcoder-2x8B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "keitokei1994/Llama-3-Umievo-Shizuko-sqlcoder-2x8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/keitokei1994/Llama-3-Umievo-Shizuko-sqlcoder-2x8B
- SGLang
How to use keitokei1994/Llama-3-Umievo-Shizuko-sqlcoder-2x8B 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 "keitokei1994/Llama-3-Umievo-Shizuko-sqlcoder-2x8B" \ --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": "keitokei1994/Llama-3-Umievo-Shizuko-sqlcoder-2x8B", "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 "keitokei1994/Llama-3-Umievo-Shizuko-sqlcoder-2x8B" \ --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": "keitokei1994/Llama-3-Umievo-Shizuko-sqlcoder-2x8B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use keitokei1994/Llama-3-Umievo-Shizuko-sqlcoder-2x8B with Docker Model Runner:
docker model run hf.co/keitokei1994/Llama-3-Umievo-Shizuko-sqlcoder-2x8B
モデルの説明(English explanation is below.)
このモデルは、MergeKitツールを使用して作成されたMixture of Experts (MoE) 言語モデルです。
gguf版(今後拡充予定)は こちら 。
mradermacherさんがgguf形式での量子化を行ってくれました。こちらから確認できます
umiyukiさんが公開しているLlama-3-Umievo-itr014-Shizuko-8b に、SQLデータセットでファインチューニングされたrdefog/llama-3-sqlcoder-8bを合わせることで、日本語能力とSQL生成能力を両立させようとしたMoEモデルです。
モデルの詳細
- モデル名: Llama-3-Umievo-Shizuko-sqlcoder-2x8B
- モデルアーキテクチャ: Mixture of Experts (MoE)
- ベースモデル: rdefog/llama-3-sqlcoder-8b, defog/llama-3-sqlcoder-8b
- マージツール: MergeKit
要求スペック
Q4_K_M量子化モデルであれば、RTX3060 12GBでフルロード可能です。
筆者はWSL2やGoogle Colaboratotry Proでの作成後、Llama.cppとLMstudioにて動作確認を行なっています。
- CPU: Ryzen 5 3600
- GPU: GeForce RTX 3060 12GB
- RAM: DDR4-3200 96GB
- OS: Windows 10
Model Description
This model is a Mixture of Experts (MoE) language model created using the MergeKit tool. The gguf version (planned to be expanded in the future) can be found here. This MoE model aims to achieve both Japanese language ability and SQL generation capability by combining Llama-3-Umievo-itr014-Shizuko-8b, released by umiyuki, with rdefog/llama-3-sqlcoder-8b, which has been fine-tuned on an SQL dataset.
Model Details
- Model Name: Llama-3-Umievo-Shizuko-sqlcoder-2x8B
- Model Architecture: Mixture of Experts (MoE)
- Base Models: rdefog/llama-3-sqlcoder-8b, defog/llama-3-sqlcoder-8b
- Merge Tool: MergeKit
Required Specifications
If using the Q4_K_M quantized model, it can be fully loaded on an RTX 3060 12GB. The author has created the model using WSL2 and Google Colaboratory Pro, and has tested it using Llama.cpp and LMstudio.
- CPU: Ryzen 5 3600
- GPU: GeForce RTX 3060 12GB
- RAM: DDR4-3200 96GB
- OS: Windows 10
- Downloads last month
- 8