This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # train_grpo.py | |
| import re | |
| import torch | |
| from datasets import load_dataset, Dataset | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| from peft import LoraConfig | |
| from trl import GRPOConfig, GRPOTrainer | |
| # Load and prep dataset | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */ | |
| /* */ | |
| /* Simple node js module to get distance between two coordinates. */ | |
| /* */ | |
| /* Code transformed from Chris Veness example code - please refer to his website for licensing */ | |
| /* questions. */ | |
| /* */ | |
| /* */ | |
| /* Latitude/longitude spherical geodesy formulae & scripts (c) Chris Veness 2002-2011 */ | |
| /* - www.movable-type.co.uk/scripts/latlong.html */ | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Basic text search with relevancy for MongoDB. | |
| # See http://blog.tty.nl/2010/02/08/simple-ranked-text-search-for-mongodb/ | |
| # Copythingie 2010 - Ward Bekker - [email protected] | |
| #create (or empty) a docs collection | |
| doc_col = MongoMapper.connection.db('example_db').collection('docs') | |
| doc_col.remove({}) | |
| #add some sample data | |
| doc_col.insert({ "txt" => "it is what it is"}) | 
