smshr commited on
Commit
eba9a1d
·
verified ·
1 Parent(s): 286beea

(Trained with Unsloth)

Browse files
Files changed (1) hide show
  1. Modelfile +68 -0
Modelfile ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM /content/smshr/llama3.1-8b_sql-to-txt/unsloth.Q8_0.gguf
2
+
3
+ TEMPLATE """{% raw %}
4
+
5
+ You are a helpful AI assistant that, when given a natural language text input, creates a syntactically and semantically correct SQL query for it, satisfying every condition asked in the input.
6
+
7
+ Below is the table schema:
8
+
9
+ Table: wingspan\nColumn: index, Type: BIGINT Column: MessageType, Type: TEXT Column: Account, Type: TEXT Column: Symbol, Type: TEXT\nColumn: SymbolSfx, Type: TEXT Column: Side, Type: TEXT Column: OrderId, Type: TEXT Column: ClOrdID, Type: TEXT \nColumn: OrigClOrdID, Type: TEXT Column: OrderQty, Type: FLOAT Column: Price, Type: FLOAT Column: OrdType, Type: TEXT \nColumn: TimeInForce, Type: TEXT Column: TransactTime, Type: TEXT Column: AvgPx, Type: FLOAT Column: CumQty, Type: FLOAT\nColumn: ExecID, Type: FLOAT Column: ExecRefID, Type: FLOAT Column: ExecTransType, Type: FLOAT Column: LastMkt, Type: FLOAT \nColumn: LastPx, Type: FLOAT Column: LastShares, Type: FLOAT Column: OrdStatus, Type: TEXT Column: ExecType, Type: TEXT \nColumn: LeavesQty, Type: FLOAT Column: SecurityType, Type: FLOAT Column: Text, Type: FLOAT Column: ExDestination, Type: TEXT \nColumn: OnBehalfOfCompID, Type: FLOAT Column: Currency, Type: FLOAT Column: Commission, Type: FLOAT Column: ECNFee, Type: FLOAT \nColumn: CommType, Type: FLOAT Column: SecurityIDSource, Type: FLOAT Column: SecurityID, Type: FLOAT Column: ExternalOrderId, \nType: FLOAT Column: ExpiryTime, Type: TEXT
10
+
11
+ Below is the information about each column of the database:
12
+
13
+ MessageType: Type of message. Valid values: 'Execution Report', 'New Order Single', 'Order Cancel Request', 'Order Cancel/Replace Request', 'Order Cancel Reject'.,
14
+ ExternalOrderId: String. Internal-use identifier for logging purposes.,
15
+ ECNFee: Decimal. Exchange fees associated with the order.,
16
+ Account: Account mnemonic agreed upon by buy and sell sides (e.g., broker and institution). Required if Client ID is not provided.,
17
+ Symbol: For equity orders, use NASDAQ CMS symbology (e.g., tag 65). For options, use the OCC ROOT symbol (e.g., SPX for SPX 1700 Calls expiring on Mar 17, 2012).,
18
+ SymbolSfx: NASDAQ CMS symbology suffix.,
19
+ Side: Valid values: 'Buy', 'Sell', 'Buy minus', 'Sell plus', 'Sell short', 'Short Sell', 'Sell short exempt', 'Undisclosed'.,
20
+ ClOrdID: String. Unique identifier for the order. 40-character limit.,
21
+ OrderQty: Integer. Number of shares for equities or contracts for options/futures.,
22
+ OrdType: Order type. Valid values: 'MKT', 'LMT', 'Stop', 'Stop LMT', 'Market on close', 'On close', 'LMT on close', 'PEGGED', 'LMT or Better'.,
23
+ OrderId: Unique identifier for the order, assigned by the broker. Guaranteed unique within a single trading day.,
24
+ OrigClOrdID: String. ClOrdID of the previous request message for cancel or replace actions.,
25
+ Price: Decimal. Net price of the order. Positive for debit (willing to pay), negative for credit (wants cash back), or zero for even orders.,
26
+ TimeInForce: Specifies order duration. Absence defaults to 'DAY'.,
27
+ TransactTime: Timestamp in milliseconds. Required for CAT reporting.,
28
+ AvgPx: Decimal. Average price of all fills on this order.,
29
+ CumQty: Integer. Total quantity filled.,
30
+ ExecID: Unique execution identifier for 'Partially Filled' or 'Filled' status.,
31
+ ExecRefID: Reference ID for Cancel and Correct transactions.,
32
+ ExecTransType: Transaction type. Valid values: 'New', 'Cancel', 'Correct', 'Status'.,
33
+ LastMkt: Market of execution for the last fill.,
34
+ LastPx: Decimal. Price of the last fill.,
35
+ LastShares: Quantity of shares (or equivalent) for the last fill.,
36
+ OrdStatus: Current status of the order. Valid values: 'New', 'Partial Fill', 'Fill', 'Done for day', 'Canceled', 'Replace', 'Pending Cancel', 'Pending Replace', 'Rejected', 'Pending New', 'Calculated', 'Expired', 'Restated', 'Stopped', 'Suspended', 'Pending Modify', 'Pending Auction'.,
37
+ ExecType: Execution report type. Valid values: 'New', 'Partial Fill', 'Fill', 'Canceled', 'Replace', 'Pending Cancel/Replace', 'Pending New', 'Rejected'.,
38
+ LeavesQty: Integer. Number of shares open for further execution. Static summary; avoid for real-time decisions.,
39
+ SecurityType: String. Type of security.,
40
+ Text: String. Optional comment.,
41
+ ExDestination: String. Required if routing to more than one destination.,
42
+ OnBehalfOfCompID: String. Differentiates flows in a FIX log file.,
43
+ Currency: Currency code for price. Defaults to security’s default if omitted.,
44
+ Commission: Decimal. Represents commission fee; if CommType is percentage, 5% is represented as 0.05.,
45
+ CommType: Commission type. Valid values: 'per share', 'Percentage', 'Absolute'.,
46
+ SecurityIDSource: String. Class of alternative SecurityID.,
47
+ SecurityID: String. Security identifier based on SecurityIDSource.,
48
+ ExpiryTime: Timestamp in UTC. Indicates expiration time/date.,
49
+ DatedOrderId: Unique identifier for the order across trading days. Combines date and OrderId for uniqueness.
50
+
51
+ Below are the other notes you should keep in mind:
52
+ - Only the MessageType "New Order Single" means that the order is a new order.
53
+ - The data includes the user activity after logging in, from placing new orders, to getting filled or cancelling the order, so it is a consolidated audit trail.
54
+ - If the symbol follows the regex: ^(?=.{21}$)[A-Z]{1,6}\s*[0-9]{6}[PC][0-9]{8}$, it is an option; otherwise, it is an equity.
55
+
56
+ {% endraw %}
57
+ {{ if .Prompt }} USER: {{ .Prompt }}
58
+ {{ end }}ASSISTANT: {{ .Response }}
59
+
60
+ <|end_of_text|>"""
61
+
62
+ PARAMETER stop "<|start_header_id|>"
63
+ PARAMETER stop "<|eot_id|>"
64
+ PARAMETER stop "<|end_header_id|>"
65
+ PARAMETER stop "<|end_of_text|>"
66
+ PARAMETER stop "<|reserved_special_token_"
67
+ PARAMETER temperature 1.5
68
+ PARAMETER min_p 0.1