Instructions to use s3nh/GOAT-Adapt-MoE-4x7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use s3nh/GOAT-Adapt-MoE-4x7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="s3nh/GOAT-Adapt-MoE-4x7B")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("s3nh/GOAT-Adapt-MoE-4x7B") model = AutoModelForCausalLM.from_pretrained("s3nh/GOAT-Adapt-MoE-4x7B") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use s3nh/GOAT-Adapt-MoE-4x7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "s3nh/GOAT-Adapt-MoE-4x7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "s3nh/GOAT-Adapt-MoE-4x7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/s3nh/GOAT-Adapt-MoE-4x7B
- SGLang
How to use s3nh/GOAT-Adapt-MoE-4x7B 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 "s3nh/GOAT-Adapt-MoE-4x7B" \ --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": "s3nh/GOAT-Adapt-MoE-4x7B", "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 "s3nh/GOAT-Adapt-MoE-4x7B" \ --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": "s3nh/GOAT-Adapt-MoE-4x7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use s3nh/GOAT-Adapt-MoE-4x7B with Docker Model Runner:
docker model run hf.co/s3nh/GOAT-Adapt-MoE-4x7B
Adapt-Goat-Moe-3x7B is an attempt to build an real GOAT. Model consist of 4 experts,
GOAT-AI Community,
Adapt-LLM - law-llm/medicine-llm, finance-llm
base_model: GOAT-AI/GOAT-7B-Community
experts:
- source_model: GOAT-AI/GOAT-7B-Community
positive_prompts:
- "chat"
- "assistant"
- "tell me"
- "explain"
- source_model: AdaptLLM/law-LLM
positive_prompts:
- "inquiries"
- "quetier"
- "legal"
- "concerns"
- "questioning"
- "judicial"
- source_model: AdaptLLM/medicine-LLM
positive_prompts:
- "diagnosis"
- "analysis"
- "disease"
- "clinical diagnosis"
- "medical"
- source_model: AdaptLLM/finance-LLM
positive_prompts:
- "guidance"
- "provide"
- "recommendations"
- "advice"
- "counting"
This model was possible by great work of GOAT_AI and ADAPTLLM researchers.
Citation
@article
{adaptllm,
title = {Adapting Large Language Models via Reading Comprehension},
author = {Daixuan Cheng and Shaohan Huang and Furu Wei},
journal = {CoRR},
volume = {abs/2309.09530},
year = {2023}
}
- Downloads last month
- 12