Skip to content

Instantly share code, notes, and snippets.

from collections import Counter
import pickle
from transformers import PreTrainedTokenizerFast
import json
# Load the base tokenizer from the model
base_tokenizer = PreTrainedTokenizerFast.from_pretrained("/cephfs/panwenbo/work/models/Meta-Llama-3-8B")
# 主要改进
# - 换成 Full finetuning
# Model define
base_model: /cephfs/panwenbo/work/models/Faro-34B
model_type: LlamaForCausalLM
tokenizer_type: LlamaTokenizer
# is_qwen_derived_model: true
trust_remote_code: true
chat_template: chatml
@BMPixel
BMPixel / fi.yml
Created April 19, 2024 08:45
Faro Yi 9B config
# 主要改进
# - 换成 Full finetuning
# Model define
base_model: /cephfs/panwenbo/work/models/Yi-9B-200K
model_type: LlamaForCausalLM
tokenizer_type: LlamaTokenizer
# is_qwen_derived_model: true
trust_remote_code: true
chat_template: chatml
Given following sentences, first we choose intents of the sentences from following intent list: [atis_flight, atis_airfare, atis_ground_service, atis_abbreviation, atis_airline, atis_quantity, atis_aircraft, atis_flight_time, atis_city, atis_capacity, atis_airport, atis_flight_no, atis_distance, atis_meal, atis_ground_fare, atis_restriction, atis_cheapest].
Then, we enumerate all entities for given sentences, where slots only come from the following slot list: [fare_basis_code, depart_date.day_number, flight_time, fromloc.airport_name, aircraft_code, depart_time.start_time, arrive_date.today_relative, toloc.airport_code, stoploc.airport_name, fromloc.airport_code, transport_type, return_date.day_number, return_time.period_of_day, toloc.country_name, depart_date.today_relative, return_date.day_name, return_time.period_mod, meal, depart_date.year, depart_date.date_relative, fromloc.state_code, toloc.city_name, flight_days, arrive_time.time, arrive_date.month_name, flight_number, return_date.month_name, toloc.st
I present you with some databases together with one example item and value constraints
Hotel
| name | type | parking | book_stay | book_day | book_people | area | stars | internet | pricerange |
| hamilton lodge | guest house | no | 1 | tuesday | 6 | north | 5 | free | cheap |
area can be one of [east, south, centre, north, west]
stars can be one digit from 0 to 5
parking can be one of [free, yes, no]
internet can be one of [free, yes, no]
book_day can be one day in a week
%% This is the full-text prompt used in Zero-shot dialogue understanding on MultiWOZ2.4
%% Following is the prompt for the first turn of the dialogue
%% The description of tables and other requirements are static across all samples.
%% All lines starting with '%%' are comments and should not be included in the prompt.
I present you with some databases together with one example item and value constraints
Hotel
| name | type | parking | book_stay | book_day | book_people | area | stars | internet | pricerange |
| hamilton lodge | guest house | no | 1 | tuesday | 6 | north | 5 | free | cheap |