Instructions to use jiangbala/game-theory-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use jiangbala/game-theory-v2 with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("meta-llama/Llama-3.1-8B-Instruct") model = PeftModel.from_pretrained(base_model, "jiangbala/game-theory-v2") - Transformers
How to use jiangbala/game-theory-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jiangbala/game-theory-v2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("jiangbala/game-theory-v2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jiangbala/game-theory-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jiangbala/game-theory-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jiangbala/game-theory-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/jiangbala/game-theory-v2
- SGLang
How to use jiangbala/game-theory-v2 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 "jiangbala/game-theory-v2" \ --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": "jiangbala/game-theory-v2", "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 "jiangbala/game-theory-v2" \ --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": "jiangbala/game-theory-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use jiangbala/game-theory-v2 with Docker Model Runner:
docker model run hf.co/jiangbala/game-theory-v2
Llama-3.1-8B Game Theory v2
This model is a fine-tuned version of meta-llama/Llama-3.1-8B-Instruct on the game_theory_v2 dataset. It is specifically optimized for game-theoretic analysis and decision-making tasks.
By employing Low-Rank Adaptation (LoRA), this model maintains strong reasoning capabilities while achieving a 48% reduction in token usage during inference, significantly improving efficiency and lowering computational costs for multi-agent or game theory applications.
π Model Description
- Base Model: Llama-3.1-8B-Instruct
- Fine-Tuning Method: LoRA (Low-Rank Adaptation)
- Primary Use Case: Analyzing strategic interactions, solving game theory matrices, and simulating multi-agent decision-making.
- Key Achievement: Successfully reduced token consumption by 48% compared to the baseline model while preserving analytical accuracy.
π― Intended Uses & Limitations
- Intended Uses: Researchers and developers can use this model to generate game theory scenarios, compute Nash equilibriums, or simulate strategic behavior with optimized token efficiency.
- Limitations: The model is specialized for game theory. Its performance on general-purpose conversational tasks or unrelated domains might be affected by the fine-tuning process.
π Training and Evaluation Data
The model was fine-tuned on the game_theory_v2 dataset.
π» Usage Example
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model_name = "meta-llama/Llama-3.1-8B-Instruct"
adapter_name = "jiangbala/game-theory-v2"
# Load base model and tokenizer
model = AutoModelForCausalLM.from_pretrained(base_model_name, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(base_model_name)
# Load LoRA adapter
model = PeftModel.from_pretrained(model, adapter_name)
# Format your prompt
prompt = "Analyze the Prisoner's Dilemma from a game theory perspective..."
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
- Downloads last month
- 11
Model tree for jiangbala/game-theory-v2
Base model
meta-llama/Llama-3.1-8B