make_json.py 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. from evaluator import *
  2. DESCRIPTION = "Test if the model can successfully convert unstructured data to JSON."
  3. TAGS = ['data']
  4. question = """
  5. Create a JSON metadata for these models:
  6. Mistral-7B-v0.1
  7. RedPajama-INCITE-7B-Base
  8. RedPajama-INCITE-Base-3B-v1
  9. falcon40b
  10. falcon7b
  11. gpt2-xl
  12. llama-65b
  13. llama-7b
  14. neo-1.3
  15. neo-2.7
  16. neo-6
  17. open_llama_3b_v2
  18. open_llama_7b_v2
  19. opt-1.3b
  20. opt-6.7b
  21. pythia-1.4
  22. pythia-1.4-dedup
  23. pythia-6.9
  24. pythia-6.9-dedup
  25. With the format:
  26. {"Mistral-7B-v0.1": {"size": 7, dataset: "", "family": "Mistral"}, ...}
  27. where family is one of
  28. base = [
  29. 'pythia',
  30. 'llama',
  31. 'Mistral',
  32. 'gpt2',
  33. 'opt',
  34. 'RedPajama',
  35. 'neo',
  36. 'open_llama',
  37. 'falcon'
  38. ]
  39. gpt2-xl is 1.5b parameters.
  40. """
  41. TestMakeJson = question >> LLMRun() >> ExtractJSON() >> JSONSubsetEvaluator({
  42. "Mistral-7B-v0.1": {"size": 7, "dataset": "", "family": "Mistral"},
  43. "RedPajama-INCITE-7B-Base": {"size": 7, "dataset": "", "family": "RedPajama"},
  44. "RedPajama-INCITE-Base-3B-v1": {"size": 3, "dataset": "", "family": "RedPajama"},
  45. "falcon40b": {"size": 40, "dataset": "", "family": "falcon"},
  46. "falcon7b": {"size": 7, "dataset": "", "family": "falcon"},
  47. "gpt2-xl": {"size": 1.5, "dataset": "", "family": "gpt2"},
  48. "llama-65b": {"size": 65, "dataset": "", "family": "llama"},
  49. "llama-7b": {"size": 7, "dataset": "", "family": "llama"},
  50. "neo-1.3": {"size": 1.3, "dataset": "", "family": "neo"},
  51. "neo-2.7": {"size": 2.7, "dataset": "", "family": "neo"},
  52. "neo-6": {"size": 6, "dataset": "", "family": "neo"},
  53. "open_llama_3b_v2": {"size": 3, "dataset": "", "family": "open_llama"},
  54. "open_llama_7b_v2": {"size": 7, "dataset": "", "family": "open_llama"},
  55. "opt-1.3b": {"size": 1.3, "dataset": "", "family": "opt"},
  56. "opt-6.7b": {"size": 6.7, "dataset": "", "family": "opt"},
  57. "pythia-1.4": {"size": 1.4, "dataset": "", "family": "pythia"},
  58. "pythia-1.4-dedup": {"size": 1.4, "dataset": "", "family": "pythia"},
  59. "pythia-6.9": {"size": 6.9, "dataset": "", "family": "pythia"},
  60. "pythia-6.9-dedup": {"size": 6.9, "dataset": "", "family": "pythia"}
  61. })
  62. if __name__ == "__main__":
  63. print(run_test(TestMakeJson))