Update README.md
Browse files
README.md
CHANGED
|
@@ -4,6 +4,15 @@ tags:
|
|
| 4 |
- unsloth
|
| 5 |
- trl
|
| 6 |
- sft
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
---
|
| 8 |
|
| 9 |
# Model Card for Model ID
|
|
@@ -12,21 +21,99 @@ tags:
|
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
<!-- Provide a longer summary of what this model is. -->
|
| 20 |
|
| 21 |
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 22 |
|
| 23 |
-
- **Developed by:** [
|
| 24 |
- **Funded by [optional]:** [More Information Needed]
|
| 25 |
- **Shared by [optional]:** [More Information Needed]
|
| 26 |
- **Model type:** [More Information Needed]
|
| 27 |
- **Language(s) (NLP):** [More Information Needed]
|
| 28 |
- **License:** [More Information Needed]
|
| 29 |
-
- **Finetuned from model [
|
| 30 |
|
| 31 |
### Model Sources [optional]
|
| 32 |
|
|
|
|
| 4 |
- unsloth
|
| 5 |
- trl
|
| 6 |
- sft
|
| 7 |
+
license: apache-2.0
|
| 8 |
+
datasets:
|
| 9 |
+
- Anudeep28/game-theory-dataset
|
| 10 |
+
language:
|
| 11 |
+
- en
|
| 12 |
+
base_model:
|
| 13 |
+
- deepseek-ai/DeepSeek-R1-Distill-Llama-8B
|
| 14 |
+
new_version: Anudeep28/DeepSeek-R1-Distill-Llama-8B-Game-theory-V1
|
| 15 |
+
pipeline_tag: text2text-generation
|
| 16 |
---
|
| 17 |
|
| 18 |
# Model Card for Model ID
|
|
|
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
+
# DeepSeek-GT: Game Theory Specialized Language Model
|
| 25 |
+
|
| 26 |
+
## Model Description
|
| 27 |
+
DeepSeek-GT is a fine-tuned version of the DeepSeek Coder Instruct 8B model, specifically optimized for game theory analysis and problem-solving. Built on the efficient DeepSeek-R1-Distill-Llama-8B architecture, this model has been trained on a curated dataset of real-world game theory scenarios, strategic analyses, and solutions.
|
| 28 |
|
| 29 |
+
## Key Features
|
| 30 |
+
- **Specialized Knowledge**: Fine-tuned on diverse game theory examples, including Nash Equilibrium analysis, strategic decision-making, and payoff evaluations
|
| 31 |
+
- **Structured Reasoning**: Provides step-by-step analysis of game theory real life scenarios, breaking down complex strategic situations into comprehensible components
|
| 32 |
+
- **Solution-Oriented**: Generates detailed solutions with clear reasoning paths and strategic implications
|
| 33 |
+
- **Architecture**: Based on DeepSeek's 8B parameter model, offering a balance between performance and computational efficiency
|
| 34 |
|
| 35 |
+
## Use Cases
|
| 36 |
+
- Analyzing strategic interactions in business and economics
|
| 37 |
+
- Solving game theory problems with detailed explanations
|
| 38 |
+
- Understanding Nash Equilibria in various scenarios
|
| 39 |
+
- Evaluating payoff matrices and optimal strategies
|
| 40 |
+
- Providing insights for decision-making in competitive situations
|
| 41 |
+
|
| 42 |
+
## Model Details
|
| 43 |
+
- **Base Model**: DeepSeek-R1-Distill-Llama-8B
|
| 44 |
+
- **Training Data**: Curated dataset of game theory examples and solutions
|
| 45 |
+
- **Input Format**: Accepts scenario descriptions and questions about real life situations
|
| 46 |
+
- **Output Format**: Structured responses including scenario analysis, strategic reasoning, and solutions
|
| 47 |
+
|
| 48 |
+
## Example Usage
|
| 49 |
+
```python
|
| 50 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 51 |
+
# Define a system prompt under prompt_style
|
| 52 |
+
prompt_style = """Below is an instruction that describes a task, paired with an input that provides further context.
|
| 53 |
+
Write a response that appropriately completes the request.
|
| 54 |
+
Before answering, think carefully about the Scenario and create a step-by-step chain of thoughts to ensure a logical and accurate response.
|
| 55 |
+
|
| 56 |
+
### Instruction:
|
| 57 |
+
You are a Game theory expert with advanced knowledge in Game theory reasoning, solutions, and in finding the optimized output.
|
| 58 |
+
Please answer the following Game theory related Scenario.
|
| 59 |
+
|
| 60 |
+
### Scenario:
|
| 61 |
+
{}
|
| 62 |
+
"""
|
| 63 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 64 |
+
from unsloth import FastLanguageModel
|
| 65 |
+
import torch
|
| 66 |
+
|
| 67 |
+
# Load model and tokenizer from hub
|
| 68 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 69 |
+
"Anudeep28/DeepSeek-R1-Distill-Llama-8B-Game-theory-V1", # your model repository name
|
| 70 |
+
torch_dtype=torch.float16, # use float16 for efficiency
|
| 71 |
+
device_map="auto",
|
| 72 |
+
load_in_4bit=True # automatically handle device placement
|
| 73 |
+
)
|
| 74 |
+
tokenizer = AutoTokenizer.from_pretrained("Anudeep28/DeepSeek-R1-Distill-Llama-8B-Game-theory-V1")
|
| 75 |
+
|
| 76 |
+
# Optional: Use Unsloth's optimization if you want the faster inference
|
| 77 |
+
|
| 78 |
+
FastLanguageModel.for_inference(model)
|
| 79 |
+
|
| 80 |
+
# Prepare your prompt
|
| 81 |
+
question = """Chris and Kim are attending the same conference and want to meet.
|
| 82 |
+
They can choose between swimming and hiking, but they don't know each other's choice beforehand.
|
| 83 |
+
They both prefer swimming, but only if they are together."""
|
| 84 |
+
|
| 85 |
+
# Load the inference model using FastLanguageModel (Unsloth optimizes for speed)
|
| 86 |
+
# merged_model = merged_model.cuda()
|
| 87 |
+
# FastLanguageModel.for_inference(merged_model) # Unsloth has 2x faster inference!
|
| 88 |
+
|
| 89 |
+
# Tokenize the input question with a specific prompt format and move it to the GPU
|
| 90 |
+
inputs = tokenizer([prompt_style.format(question, "")], return_tensors="pt").to("cuda")
|
| 91 |
+
|
| 92 |
+
# Tokenize input
|
| 93 |
+
# Generate a response using LoRA fine-tuned model with specific parameters
|
| 94 |
+
outputs = model.generate(
|
| 95 |
+
input_ids=inputs.input_ids, # Tokenized input IDs
|
| 96 |
+
attention_mask=inputs.attention_mask, # Attention mask for padding handling
|
| 97 |
+
max_new_tokens=1200, # Maximum length for generated response
|
| 98 |
+
use_cache=True, # Enable cache for efficient generation
|
| 99 |
+
)
|
| 100 |
+
|
| 101 |
+
# Decode the generated response from tokenized format to readable text
|
| 102 |
+
response = tokenizer.batch_decode(outputs)
|
| 103 |
+
|
| 104 |
+
# Extract and print only the model's response part after "### Response:"
|
| 105 |
+
print(response[0].split("### Response:")[1])
|
| 106 |
<!-- Provide a longer summary of what this model is. -->
|
| 107 |
|
| 108 |
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
| 109 |
|
| 110 |
+
- **Developed by:** [Eneru]
|
| 111 |
- **Funded by [optional]:** [More Information Needed]
|
| 112 |
- **Shared by [optional]:** [More Information Needed]
|
| 113 |
- **Model type:** [More Information Needed]
|
| 114 |
- **Language(s) (NLP):** [More Information Needed]
|
| 115 |
- **License:** [More Information Needed]
|
| 116 |
+
- **Finetuned from model [deepseek-ai/DeepSeek-R1-Distill-Llama-8B]:** [More Information Needed]
|
| 117 |
|
| 118 |
### Model Sources [optional]
|
| 119 |
|