Instructions to use hlab/SocialiteLlama with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hlab/SocialiteLlama with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="hlab/SocialiteLlama")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("hlab/SocialiteLlama") model = AutoModelForCausalLM.from_pretrained("hlab/SocialiteLlama") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hlab/SocialiteLlama with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hlab/SocialiteLlama" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hlab/SocialiteLlama", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hlab/SocialiteLlama
- SGLang
How to use hlab/SocialiteLlama 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 "hlab/SocialiteLlama" \ --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": "hlab/SocialiteLlama", "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 "hlab/SocialiteLlama" \ --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": "hlab/SocialiteLlama", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hlab/SocialiteLlama with Docker Model Runner:
docker model run hf.co/hlab/SocialiteLlama
Socialite-Llama Model Card
Model Details
Model Type : Socialite-Llama is an open-source, instruction tuned Llama2 7B on SocialiteInstructions. On a suite of 20 social science tasks, Socialite-Llama improves upon the performance of Llama as well as matches or improves upon the performance of a state-of-the-art, multi-task finetuned model on a majority of them. Further, Socialite-Llama also leads to improvement on 5 out of 6 related social tasks as compared to Llama, suggesting instruction tuning can lead to generalized social understanding.
Model date: Socialite-Llama was trained on October, 2023.
Paper Details: [https://arxiv.org/abs/2402.01980]
Github: [https://github.com/humanlab/socialitellama]
License
Llama 2 is licensed under the LLAMA 2 Community License, Copyright (c) Meta Platforms, Inc. All Rights Reserved.
Training Dataset
- 108k datapoints of <Instruction, Input, Output> triplets
- 20 diverse datasets covering a broad range of social scientific tasks
Evaluation Dataset
- 20 tasks which the model has seen during training
- 6 related social tasks which the model has not seen during its training
Intended Use
The primary intended use of Socialite Llama is research on Computation Social Science and Cultural Analytics.
Citation Information
@inproceedings{
dey-etal-2024-socialite,
title={{SOCIALITE}-{LLAMA}: An Instruction-Tuned Model for Social Scientific Tasks},
author={Dey, Gourab and V Ganesan, Adithya and Lal, Yash Kumar and Shah, Manal and Sinha, Shreyashee and Matero, Matthew and Giorgi, Salvatore and Kulkarni, Vivek and Schwartz, H. Andrew},
address = "St. Julian’s, Malta",
booktitle={18th Conference of the European Chapter of the Association for Computational Linguistics},
year={2024},
publisher = {Association for Computational Linguistics}
}
- Downloads last month
- 2
